Files
comfyui-nvidia/deployments/ai-stack
57_WolveandClaude Opus 4.7 b1c9bff15f Match init-models.sh to the live preseed list
Five models from the production GPU host's current pull set. Picks up
the idempotency-checking loop pattern from the source script so re-runs
print "already present" instead of re-pulling.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-19 10:41:29 -05:00
..

ai-stack — combined deployment example

The full multi-service stack: Caddy (TLS + reverse proxy) in front of Open WebUI (chat + image generation panel), Ollama (LLMs), and ComfyUI (image generation), with an optional Anubis PoW anti-bot sidecar. One GPU host, one bridge network, one TLS entry point.

This is what runs in production for the srvno.de deployment, sanitized for sharing.

Files

File Purpose
docker-compose.yml Service definitions, volumes, GPU reservations
Caddyfile TLS + reverse proxy config (one site block per hostname)
init-models.sh Models to preseed into Ollama on first boot
.env.example Secrets and image-tag pins. Copy to .env

Bring it up

cp .env.example .env
# edit .env — generate the two keys with `openssl rand -hex 32`

# edit Caddyfile — replace example.com hostnames with yours, replace the
# basic_auth bcrypt placeholder, point DNS at this host

# edit init-models.sh — keep the models you want, drop the rest

docker compose up -d
docker compose logs -f

First boot: Caddy provisions Let's Encrypt certs (DNS must already point here), the model-init container pulls the LLMs listed in init-models.sh (can take a while — mistral-nemo:12b is ~7 GB), and ComfyUI initialises its volumes empty. Drop a checkpoint into the comfyui-models volume under checkpoints/ before the first image generation — see the repo root SETUP.md §4.

After Open WebUI is up, finish the ComfyUI integration via the admin panel — paste the four workflow JSONs from ../../workflows/. See SETUP.md §6.

What's different from the upstream comfyui-nvidia standalone compose

The standalone compose at the repo root is just comfyui + open-webui on a fresh bridge — meant for kicking the tyres or running ComfyUI on a single-purpose box. This deployment adds:

  • Caddy with auto-TLS, so Open WebUI and ComfyUI are reachable on real hostnames over HTTPS instead of localhost:3000.
  • Ollama for chat models, with a one-shot model-init puller that preseeds whatever init-models.sh lists.
  • Anubis anti-bot stub for protected hostnames (commented in by default; uncomment + provide a key to activate).
  • No host ports published for ComfyUI or Open WebUI — Caddy is the only service bound to 80/443.