fix(deploy): use variable for fastapi upstream in nginx-m1.conf to fix host not found at startup

This commit is contained in:
2026-09-19 15:56:20 -07:00
parent 6aaad81583
commit e63c964844
+3 -1
View File
@@ -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';