zitadel: installer for v4 (#7058)

This commit is contained in:
CanbiZ 2025-08-21 20:04:09 +02:00 committed by GitHub
parent 13f46d2c58
commit 15dedc1e16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,10 @@ Database:
RootCert: ""
Cert: ""
Key: ""
DefaultInstance:
Features:
LoginV2:
Required: false
EOF
msg_ok "Installed Zitadel Enviroments"
@ -114,7 +118,7 @@ systemctl enable -q zitadel
msg_ok "Created Services"
msg_info "Zitadel initial setup"
zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null &
$STD zitadel start-from-init --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
sleep 60
kill $(lsof -i | awk '/zitadel/ {print $2}' | head -n1)
useradd zitadel
@ -123,16 +127,16 @@ msg_ok "Zitadel initialized"
msg_info "Set ExternalDomain to current IP and restart Zitadel"
IP=$(ip a s dev eth0 | awk '/inet / {print $2}' | cut -d/ -f1)
sed -i "0,/localhost/s/localhost/${IP}/" /opt/zitadel/config.yaml
systemctl stop -q zitadel.service
zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml &>/dev/null
systemctl restart -q zitadel.service
systemctl stop -q zitadel
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
systemctl restart -q zitadel
msg_ok "Zitadel restarted with ExternalDomain set to current IP"
msg_info "Create zitadel-rerun.sh"
cat <<EOF >~/zitadel-rerun.sh
systemctl stop zitadel.service
systemctl stop zitadel
timeout --kill-after=5s 15s zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml
systemctl restart zitadel.service
systemctl restart zitadel
EOF
msg_ok "Bash script for rerunning Zitadel after changing Zitadel config.yaml"