services: comfyui: # Mount local repo live — no rebuild needed after code changes. # Re-installs comfydv deps on each start (fast: jinja2 is likely cached). volumes: - .:/app/ComfyUI/custom_nodes/comfydv # Allow the container to reach Ollama running on the host machine. # On Linux: host-gateway resolves to the Docker bridge IP. # On macOS/Windows Docker Desktop: host.docker.internal is built-in. extra_hosts: - "host.docker.internal:host-gateway" environment: # Tells comfydv where to reach Ollama on the host so model dropdowns are # pre-populated at server start without needing a manual Refresh click. - OLLAMA_HOST=http://host.docker.internal:11434 command: - sh - -c - | git clone https://github.com/Comfy-Org/ComfyUI-Manager.git /app/ComfyUI/custom_nodes/comfyui-manager pip install -q -r /app/ComfyUI/custom_nodes/comfyui-manager/requirements.txt pip install -q -r /app/ComfyUI/custom_nodes/comfydv/requirements.txt exec python main.py --cpu --listen 0.0.0.0 --port 8188