Fix nginx upstream resolution by removing broken Docker DNS resolver
The resolver 127.0.0.11 directive caused ECONNREFUSED errors in this network setup. Direct proxy_pass resolves server at startup which is sufficient since depends_on ensures server is running first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1f51504de9
commit
18d238a602
@ -8,11 +8,8 @@ server {
|
|||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
resolver 127.0.0.11 valid=30s;
|
|
||||||
|
|
||||||
location /api/ {
|
location /api/ {
|
||||||
set $backend http://server:3000;
|
proxy_pass http://server:3000;
|
||||||
proxy_pass $backend;
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
@ -20,8 +17,7 @@ server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
location /uploads/ {
|
location /uploads/ {
|
||||||
set $backend http://server:3000;
|
proxy_pass http://server:3000;
|
||||||
proxy_pass $backend;
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user