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:
@@ -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;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user