From ae1c349b55b911e120f8b58a2d724d6690a81aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Fri, 21 Nov 2025 21:24:51 +0100 Subject: [PATCH] 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) --- ai/comfyui-nginx.conf | 2 +- ai/compose.yaml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ai/comfyui-nginx.conf b/ai/comfyui-nginx.conf index 295d469..0eae1f2 100644 --- a/ai/comfyui-nginx.conf +++ b/ai/comfyui-nginx.conf @@ -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; diff --git a/ai/compose.yaml b/ai/compose.yaml index 79a6a70..84e96a2 100644 --- a/ai/compose.yaml +++ b/ai/compose.yaml @@ -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: