From e63c96484440d31efc50bda4124baa6a170ad756 Mon Sep 17 00:00:00 2001 From: Ty Balascio Date: Sat, 19 Sep 2026 15:56:20 -0700 Subject: [PATCH] fix(deploy): use variable for fastapi upstream in nginx-m1.conf to fix host not found at startup --- deploy/nginx-m1.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/nginx-m1.conf b/deploy/nginx-m1.conf index dae7fe7..d086807 100644 --- a/deploy/nginx-m1.conf +++ b/deploy/nginx-m1.conf @@ -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';