fix: nginx dns re-resolve, db healthcheck, explicit bind
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user