Deployment Architecture
How to run one Bellamy Book instance (self-hosted social network) in different environments.
Operator install guides: Self-Hosting.
Choose a path
| Goal | Path | What you use |
|---|---|---|
| Customer self-host (no source build) | Pre-built images | dockerPublish kit — Self-host with pre-built images |
| Test the kit on a laptop | Same images, local override | Local testing |
| Production from monorepo | Build full stack | dockerProd Compose (API, workers, frontend, admin, docs, Traefik) |
| Develop features | Infra Docker + apps on host | dockerLocalENV + run API / Frontend / Admin / workers locally |
| CI/CD | Build → registry → deploy | Jenkins / Harbor (CICD/) |
What do you need?
┌───────────────┼───────────────┐
▼ ▼ ▼
Local develop Customer install Your prod VPS
dockerLocalENV dockerPublish dockerProd
+ run apps pull images full compose
What a full deployment includes
| Group | Components |
|---|---|
| Apps | Frontend (Nginx), Admin (Nginx), API, Docs site |
| Workers | Interaction, Scoring, Trending, Graph, Hashtag, ES Sync, Media, Chat, WebSocket, Web Push, Expo Push, Blog AI, Content Moderation |
| Data | PostgreSQL (± replica), MongoDB, Redis, RabbitMQ, Kafka, Elasticsearch, MinIO/R2, Neo4j |
| Edge | Traefik (DNS hostnames, TLS) — see Traefik when you deploy |
| Optional | LiveKit, monitoring (Prometheus/Grafana/…) |
Topology (production)
Internet → Traefik (80/443)
├─ frontend host → frontend
├─ admin host → admin
├─ api host → api
├─ /hubs/chat* → chat-worker
└─ /hubs/notification* → websocket-worker
│
API + workers ↔ Postgres/Mongo/Redis/Kafka/Rabbit/ES/MinIO/Neo4j
Environment essentials
- One
.envfor self-host kit (domains, secrets, MinIO, JWT) — Environment - Frontend / Admin public URLs must match CORS and Traefik hosts
- Run DB migration once (
db-migration/ DatabaseApplication) - Activate license in Admin after first boot (CONSUMER)
Scaling notes
- Scale API and workers horizontally; keep Kafka consumer groups and RabbitMQ consumers in mind
- Media worker scales by polling load; chat/notification workers need Redis backplane for multi-instance SignalR
- Details: Scaling