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: