From 4ebca7d55085bffe0aaa265cfa4fccf0ac554f82 Mon Sep 17 00:00:00 2001 From: zaragoza444 Date: Mon, 29 Jun 2026 05:20:58 -0700 Subject: [PATCH] fix: ship nginx auth placeholder so LXC portals start before env push Co-authored-by: Cursor --- deploy/nginx/omnl-portal-auth-current.conf.inc | 2 ++ .../deployment/deploy-omnl-banking-portal-pct.sh | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 deploy/nginx/omnl-portal-auth-current.conf.inc diff --git a/deploy/nginx/omnl-portal-auth-current.conf.inc b/deploy/nginx/omnl-portal-auth-current.conf.inc new file mode 100644 index 0000000..f335f3b --- /dev/null +++ b/deploy/nginx/omnl-portal-auth-current.conf.inc @@ -0,0 +1,2 @@ +# Placeholder — replaced per-CTID by push-portal-env-to-lxc.sh / generate-portal-nginx-auth-snippet.sh +# Empty headers until super-admin key is injected. diff --git a/scripts/deployment/deploy-omnl-banking-portal-pct.sh b/scripts/deployment/deploy-omnl-banking-portal-pct.sh index 99d671d..c27f697 100755 --- a/scripts/deployment/deploy-omnl-banking-portal-pct.sh +++ b/scripts/deployment/deploy-omnl-banking-portal-pct.sh @@ -55,7 +55,18 @@ tar -czf "$STAGE" \ services/dbis-exchange/package.json \ services/dbis-exchange/package-lock.json \ scripts/deployment/start-omnl-banking-portal.sh \ - deploy/nginx/omnl-lxc-portal.conf + deploy/nginx/omnl-lxc-portal.conf \ + deploy/nginx/omnl-portal-auth-current.conf.inc + +if [[ -f "$REPO_DIR/.env" ]]; then + set -a + # shellcheck disable=SC1090 + source "$REPO_DIR/.env" + set +a + if bash "$SCRIPT_DIR/generate-portal-nginx-auth-snippet.sh" "$CTID" "$REPO_DIR/deploy/nginx/omnl-portal-auth-${CTID}.conf.inc" 2>/dev/null; then + cp "$REPO_DIR/deploy/nginx/omnl-portal-auth-${CTID}.conf.inc" "$REPO_DIR/deploy/nginx/omnl-portal-auth-current.conf.inc" + fi +fi log "Push to PVE host ${OMNL_PVE_SSH_TARGET}..." omnl_pve_scp "$STAGE" "${OMNL_PVE_SSH_TARGET}:/tmp/omnl-portal.tar.gz"