fix: nginx dns re-resolve, db healthcheck, explicit bind

This commit is contained in:
mahmood
2026-09-10 14:51:57 +03:30
parent 7d93507089
commit 1b675804ea
5 changed files with 25 additions and 5 deletions
+7 -1
View File
@@ -5,8 +5,14 @@ server {
root /usr/share/nginx/html;
index index.html;
# Docker's embedded DNS. Without re-resolving at request time, nginx caches the
# api container's IP from startup and keeps returning 502 ("no live upstreams")
# after the api container restarts with a new IP.
resolver 127.0.0.11 valid=10s ipv6=off;
location /api/ {
proxy_pass http://api:3000;
set $api_upstream http://api:3000;
proxy_pass $api_upstream$request_uri;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;