Add persistent admin password login and deploy verified release
This commit is contained in:
1 parent
beeca041ef
commit
bf424102c8
12 files changed
+319
-35
No files matched your search
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
cd /opt/vibe-launcher
|
||||
STAGE=$(mktemp -d /opt/vibe-launcher/deploy8.XXXXXXXX)
|
||||
mkdir -p "$STAGE/target"
|
||||
cp target/vibe-launcher-backend.jar "$STAGE/target/"
|
||||
cp Dockerfile "$STAGE/"
|
||||
cp -p auth.env "$STAGE/auth.env.backup"
|
||||
python3 - <<'PY'
|
||||
from pathlib import Path
|
||||
import secrets
|
||||
p = Path('/opt/vibe-launcher/auth.env')
|
||||
s = p.read_text()
|
||||
if 'ADMIN_USERNAME=' not in s: s += '\nADMIN_USERNAME=admin\n'
|
||||
if 'ADMIN_PASSWORD=' not in s: s += 'ADMIN_PASSWORD=' + secrets.token_urlsafe(24) + '\n'
|
||||
p.write_text(s)
|
||||
p.chmod(0o600)
|
||||
PY
|
||||
kubectl -n vibe-launcher create secret generic vibe-launcher-auth --from-env-file=auth.env --dry-run=client -o yaml | kubectl apply -f -
|
||||
docker build -t docker.io/library/vibe-launcher-backend:1.1.0-deploy8 "$STAGE"
|
||||
docker save docker.io/library/vibe-launcher-backend:1.1.0-deploy8 | k3s ctr images import -
|
||||
kubectl apply -f deploy.yaml
|
||||
if ! kubectl -n vibe-launcher rollout status deploy/vibe-launcher-backend --timeout=180s; then
|
||||
kubectl -n vibe-launcher set image deploy/vibe-launcher-backend server=docker.io/library/vibe-launcher-backend:1.1.0-deploy7
|
||||
exit 1
|
||||
fi
|
||||
bash verify.sh
|
||||
python3 verify-login.py
|
||||
Reference in new issue
Block a user