Skip to main content

Deployment Architecture

How to run one Bellamy Book instance (self-hosted social network) in different environments.

Operator install guides: Self-Hosting.

Choose a path​

GoalPathWhat you use
Customer self-host (no source build)Pre-built imagesdockerPublish kit — Self-host with pre-built images
Test the kit on a laptopSame images, local overrideLocal testing
Production from monorepoBuild full stackdockerProd Compose (API, workers, frontend, admin, docs, Traefik)
Develop featuresInfra Docker + apps on hostdockerLocalENV + run API / Frontend / Admin / workers locally
CI/CDBuild → registry → deployJenkins / 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​

GroupComponents
AppsFrontend (Nginx), Admin (Nginx), API, Docs site
WorkersInteraction, Scoring, Trending, Graph, Hashtag, ES Sync, Media, Chat, WebSocket, Web Push, Expo Push, Blog AI, Content Moderation
DataPostgreSQL (± replica), MongoDB, Redis, RabbitMQ, Kafka, Elasticsearch, MinIO/R2, Neo4j
EdgeTraefik (DNS hostnames, TLS) — see Traefik when you deploy
OptionalLiveKit, 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 .env for 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