From 15201b7a3c48de96385a170dffd4a1209140d429 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Tue, 5 May 2026 00:42:54 -0700 Subject: [PATCH] fix: nginx missing in self host script (#2911) --- install.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 7d514e2bb..71cc0f043 100755 --- a/install.sh +++ b/install.sh @@ -52,11 +52,22 @@ cd "$PUTER_DIR" mkdir -p puter/config puter/data puter/tls log "install dir: $(pwd)" -# ── Step 3: docker-compose.yml ────────────────────────────────────── +# ── Step 3: docker-compose.yml + nginx config ────────────────────── log "downloading docker-compose.yml from $PUTER_URL" curl -fsSL "$PUTER_URL/docker-compose.yml" -o docker-compose.yml \ || die "could not fetch $PUTER_URL/docker-compose.yml" +# nginx is mounted as `./nginx/nginx.conf:/etc/nginx/nginx.conf:ro` — if +# the host file is missing, docker silently creates a directory at that +# path and the mount fails with "not a directory" at container start. +log "downloading nginx/nginx.conf from $PUTER_URL" +mkdir -p nginx +# If the path was previously auto-created as a dir by a failed `compose up`, +# remove it so curl can write the file. +[ -d nginx/nginx.conf ] && rmdir nginx/nginx.conf 2>/dev/null || true +curl -fsSL "$PUTER_URL/nginx/nginx.conf" -o nginx/nginx.conf \ + || die "could not fetch $PUTER_URL/nginx/nginx.conf" + # ── Step 4: secrets, .env, config.json ────────────────────────────── write_config=1 if [ -f .env ] && [ -f puter/config/config.json ] && [ "$PUTER_FORCE" != "1" ]; then