From 3126bb4c767f253727493485bcf62945b9aeeff0 Mon Sep 17 00:00:00 2001 From: Anton Afanasyeu Date: Sun, 28 Jun 2026 23:12:04 +0200 Subject: [PATCH] nginx: sync config from git repo before install (prevents stale NFS override) Co-authored-by: Cursor --- sim/cluster0/scripts/configure-nginx.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sim/cluster0/scripts/configure-nginx.sh b/sim/cluster0/scripts/configure-nginx.sh index ff5a889..4fc2558 100644 --- a/sim/cluster0/scripts/configure-nginx.sh +++ b/sim/cluster0/scripts/configure-nginx.sh @@ -5,6 +5,12 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)" . "$ROOT/scripts/lib/common.sh" ensure_shared_mounted +# Prefer the git repo nginx template over the shared cluster copy (keeps nginx config up to date +# with submodule commits). Falls back to the shared copy if git repo unavailable. +GIT_NGINX="/mnt/repos/ac/ac-deploy/sim/cluster0/nginx/apps-port80.conf" +if [ -f "$GIT_NGINX" ]; then + install -D -m 644 "$GIT_NGINX" "$ROOT/nginx/apps-port80.conf" +fi install -D -m 644 "$ROOT/nginx/apps-port80.conf" /etc/nginx/http.d/androidcast.conf rm -f /etc/nginx/http.d/default.conf /etc/nginx/http.d/cluster.conf 2>/dev/null || true nginx -t