fix(deploy): use variable for fastapi upstream in nginx-m1.conf to fix host not found at startup
This commit is contained in:
@@ -6,8 +6,10 @@ server {
|
||||
|
||||
# SPA: fall back to index.html for any path
|
||||
# Proxy API calls to the FastAPI backend (M3+)
|
||||
# Use variable to defer DNS resolution (docker service name "fastapi")
|
||||
location /api/ {
|
||||
proxy_pass http://fastapi:8000;
|
||||
set $fastapi_upstream fastapi;
|
||||
proxy_pass http://$fastapi_upstream:8000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
|
||||
Reference in New Issue
Block a user