diff --git a/ai/nginx.conf.template b/ai/nginx.conf.template index 1938561..780693c 100644 --- a/ai/nginx.conf.template +++ b/ai/nginx.conf.template @@ -7,6 +7,10 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; + # DNS resolver for Tailscale MagicDNS + resolver 100.100.100.100 8.8.8.8 valid=30s; + resolver_timeout 5s; + # Proxy settings proxy_http_version 1.1; proxy_buffering off; @@ -34,7 +38,9 @@ http { location / { # Proxy to service on RunPod via Tailscale - proxy_pass http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT}; + # Use variable to force runtime DNS resolution (not startup) + set $backend http://${GPU_SERVICE_HOST}:${GPU_SERVICE_PORT}; + proxy_pass $backend; # WebSocket upgrade proxy_http_version 1.1;