feat: make ComfyUI backend IP/port configurable via environment variables

- Replace hardcoded IP in comfyui-nginx.conf with env vars
- Add COMFYUI_BACKEND_HOST and COMFYUI_BACKEND_PORT to compose.yaml
- Use envsubst to substitute variables at container startup
- Defaults: 100.121.199.88:8188 (current RunPod Tailscale IP)
This commit is contained in:
2025-11-21 21:24:51 +01:00
parent 66d8c82e47
commit ae1c349b55
2 changed files with 5 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ http {
location / {
# Proxy to ComfyUI on RunPod via Tailscale
proxy_pass http://100.121.199.88:8188;
proxy_pass http://${COMFYUI_BACKEND_HOST}:${COMFYUI_BACKEND_PORT};
# WebSocket upgrade
proxy_http_version 1.1;

View File

@@ -206,8 +206,11 @@ services:
restart: unless-stopped
environment:
TZ: ${TIMEZONE:-Europe/Berlin}
COMFYUI_BACKEND_HOST: ${COMFYUI_BACKEND_HOST:-100.121.199.88}
COMFYUI_BACKEND_PORT: ${COMFYUI_BACKEND_PORT:-8188}
volumes:
- ./comfyui-nginx.conf:/etc/nginx/nginx.conf:ro
- ./comfyui-nginx.conf:/etc/nginx/nginx.conf.template:ro
command: /bin/sh -c "envsubst '$${COMFYUI_BACKEND_HOST},$${COMFYUI_BACKEND_PORT}' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"
networks:
- compose_network
labels: