From c74f8ba3a797d4a31c712455f66c7c291e2b9508 Mon Sep 17 00:00:00 2001 From: Alex Moreton Date: Fri, 16 Jan 2026 17:50:40 +0000 Subject: [PATCH] Update deploy scripts --- nginx/production.conf | 5 ++++- scripts/production.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/nginx/production.conf b/nginx/production.conf index 3514000..9d8e48e 100644 --- a/nginx/production.conf +++ b/nginx/production.conf @@ -67,7 +67,10 @@ http { location / { client_max_body_size 1M; - proxy_pass http://app:3000; + # Use Docker's internal DNS resolver with 10s TTL to handle container IP changes + resolver 127.0.0.11 valid=10s ipv6=off; + set $upstream app:3000; + proxy_pass http://$upstream; # Specific proxy settings # proxy_set_header Host $host; diff --git a/scripts/production.sh b/scripts/production.sh index 2a276b5..017711d 100755 --- a/scripts/production.sh +++ b/scripts/production.sh @@ -19,3 +19,7 @@ docker compose -f $COMPOSE_FILE build app docker compose -f $COMPOSE_FILE up -d --no-deps --scale app=2 app sleep 15 # Wait for healthcheck (adjust as needed) docker compose -f $COMPOSE_FILE up -d --no-deps --scale app=1 app + +## Reload nginx to pick up new app container IPs +echo "Reloading nginx..." +docker exec decentralizard-nginx nginx -s reload