Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion nginx/production.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions scripts/production.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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