Add deployments/ai-stack — combined production-shape example

Sanitized snapshot of the live srvno.de stack: Caddy + Ollama (with
preseed) + ComfyUI + Open WebUI + Anubis stub. Real hostnames,
secrets, and bcrypt hash replaced with placeholders so the dir is safe
to commit.

Caddyfile updated to point at comfyui:8188 (the source file pointed at
the now-removed forge service). Dropped FIGMENT_/FORGE_/SEGMENT_IMAGE_TAG
from the env example. Harmonised the init-models.sh mount path between
ollama and model-init services.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
57_WolveandClaude Opus 4.7 committed 2026-04-19 10:40:41 -05:00
1 parent 09fcec7c07
commit 5b61caa197
6 files changed
+308

No files matched your search

+59
View File
@@ -0,0 +1,59 @@
# 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
```sh
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](../../SETUP.md) §4.
After Open WebUI is up, finish the ComfyUI integration via the admin
panel — paste the four workflow JSONs from [`../../workflows/`](../../workflows/).
See [SETUP.md §6](../../SETUP.md).
## 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.