fix: resolver-based nginx config and env vars for template configs

- Use Docker embedded DNS (127.0.0.11) with variables in proxy_pass
  instead of upstream blocks to prevent nginx crash loops when
  backend isn't ready during startup
- Add STACK_NAME env to web and livekit services for golang
  template_driver config resolution
- Add LIVEKIT_API_KEY env to livekit service for config template
- Add livekit_as secret to livekit service
- Increase web healthcheck retries and start_period
- Bump NGINX_CONF_VERSION to v2
This commit is contained in:
notplants
2026-02-27 19:30:57 +00:00
parent 94c657e976
commit e4bb97a181
3 changed files with 19 additions and 12 deletions

View File

@ -185,6 +185,9 @@ services:
livekit:
image: livekit/livekit-server:v1.8.2
command: --config /livekit-server.yaml
environment:
- STACK_NAME
- LIVEKIT_API_KEY
# WebRTC ICE ports must be published directly on the host.
# These carry raw RTP media, not HTTP — cannot be proxied through Traefik.
# See docs/multinode.md for multi-node deployment considerations.
@ -200,6 +203,8 @@ services:
configs:
- source: livekit_config
target: /livekit-server.yaml
secrets:
- livekit_as
networks:
- proxy
- backend
@ -214,12 +219,14 @@ services:
web:
image: nginx:1.29
environment:
- STACK_NAME
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8083"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
retries: 10
start_period: 30s
configs:
- source: nginx_conf
target: /etc/nginx/conf.d/default.conf