Post

Docker Compose Stack Patterns — 50+ Production Stacks

Recurring compose patterns across produktor.io, AI Fabric, trading, and GIS stacks.

Docker Compose Stack Patterns — 50+ Production Stacks

Inventory-driven notes from 52 canonical Compose stacks on the local workstation (128 on long-term archive) — the patterns that repeat across produktor.io, AI Fabric, trading, and GIS projects.

Top technologies by stack count

TechnologyStacks
PostgreSQL40
Grafana22
MinIO19
Loki18
Redis15
Promtail14
Ollama6
Gitea5
OnlyOffice6
Matrix / Synapse5
coturn / LiveKit / Jitsi3+ (RTC stacks)

Pattern 1 — Observability sidecar trio

Grafana + Loki + Promtail appears in 14+ stacks. Standard layout:

  • Promtail tails container logs and host files
  • Loki stores indexed logs (cheap retention)
  • Grafana dashboards per service (binance-api, gitea, onlyoffice)

Used in: trading sync, Markets Platform, produktor orange stack.

Pattern 2 — Self-hosted Git + CI

Gitea + act_runner + MinIO for artifact/S3-compatible storage:

  • AI Fabric — issue → PR automation
  • produktor.io Gitea — private product repos

Pattern 3 — AI inference plane

Ollama + Open WebUI (6 stacks) plus optional Qdrant / Neo4j for RAG:

  • go-second-brain — full graph + vector pipeline
  • produktor experiments — model serving without cloud API

Pattern 4 — Document & collaboration

OnlyOffice + PostgreSQL + RabbitMQ/MinIO — document editing with S3-backed storage. Pairs with go-onlyoffice for task/calendar API automation.

Pattern 5 — GIS data plane

PostGIS + tileserver + nginx/php — Mapbender and produktor geo stacks. See WhereGroup and Immowelt.

Pattern 6 — Matrix chat + WebRTC media plane

Synapse + Element + coturn is the baseline; LiveKit + lk-jwt adds MatrixRTC (Element Call / Element X group calls). Optional Jitsi Meet profile for on-prem conference rooms.

  • Matrix / WebRTC / VoIP — three federated orgs, WAN port-forward tables, ICE debugging
  • go-second-brain — Matrix bot + voice on the same homeserver
  • Markets Platform Illja contract — Element PWA + Synapse + coturn

Operational habit: keep coturn external-ip and LiveKit rtc.node_ip on the same WAN egress; publish UDP relay ranges on the router, not only TCP 443.

Operational habits

  • One compose.yml per product — avoid mega-compose with 30 unrelated services
  • Named volumes for Postgres/MinIO; bind mounts only for dev configs
  • Profile flags (profiles: [kg, bot]) to spin subsets (go-second-brain pattern)
  • Healthchecks on Postgres and Gitea before dependent services start

produktor.io · AI Fabric · Analytics stack · Matrix / WebRTC

This post is licensed under CC BY 4.0 by the author.