fix: remove nginx Plus-only zone/resolve directives from nginx.conf (#1837)

* fix: add missing DEER_FLOW_CONFIG_PATH and DEER_FLOW_EXTENSIONS_CONFIG_PATH env vars to gateway service (fixes #1829)

The gateway service was missing these two environment variables that tell
it where to find the config files inside the container. Without them,
the gateway reads DEER_FLOW_CONFIG_PATH from the host's .env file (set
to a host filesystem path), which is not accessible inside the container,
causing FileNotFoundError on startup. The langgraph service already had
these variables set correctly.

* fix: remove nginx Plus-only zone/resolve directives from nginx.conf (fixes #1744)

The `zone` and `resolve` parameters in upstream server directives are
nginx Plus features not available in the standard `nginx:alpine` image.
This caused nginx to fail at startup with:

  [emerg] invalid parameter "resolve" in /etc/nginx/nginx.conf:25

Remove these directives so the config is compatible with open-source nginx.
Docker's internal DNS (127.0.0.11, already configured via `resolver`) handles
service name resolution. The `resolver` directive is kept for the provisioner
location which uses variable-based proxy_pass for optional-service support.
This commit is contained in:
Octopus 2026-04-03 22:03:22 -05:00 committed by GitHub
parent fb2d99fd86
commit fd310582bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,21 +18,20 @@ http {
resolver 127.0.0.11 valid=10s ipv6=off;
# Upstream servers (using Docker service names)
# NOTE: add `resolve` so nginx re-resolves container IPs after restarts.
# Otherwise nginx may keep stale DNS results and proxy to the wrong container.
# NOTE: `zone` and `resolve` are nginx Plus-only features and are not
# available in the standard nginx:alpine image. Docker's internal DNS
# (127.0.0.11) handles service discovery; upstreams are resolved at
# nginx startup and remain valid for the lifetime of the deployment.
upstream gateway {
zone gateway 64k;
server gateway:8001 resolve;
server gateway:8001;
}
upstream langgraph {
zone langgraph 64k;
server langgraph:2024 resolve;
server langgraph:2024;
}
upstream frontend {
zone frontend 64k;
server frontend:3000 resolve;
server frontend:3000;
}
# ── Main server (path-based routing) ─────────────────────────────────