Skip to main content
Deploy the full stack on Docker Swarm with rolling updates, hardened networking, and TLS termination.

Initialize Docker Swarm (manager node)

docker swarm init
docker node ls

Deploy the complete infrastructure

Run the deployment script from the repository root:
./deploy.sh
The script creates networks and volumes, then brings up all Swarm services defined in docker-compose.yml in the correct order.

Rolling updates

./update.sh
Performs zero-downtime rolling updates, refreshes configuration, and replaces containers at the Swarm layer.

Production NGINX reverse proxy

NGINX handles TLS termination, routing, WebSocket upgrades, and proxy buffering. Update domain mappings in:
  • chatapi.conf
  • extensions.conf
  • mgmtapi.conf
  • notifications.conf
  • dashboard.conf
  • globalwebhooks.conf
  • moderation.conf
  • websocket.conf

Domain configuration

When replacing <your-domain>, update environment values for:
  • Chat API, Management API, Extensions, Notifications, Moderation, Webhooks, and SQL Consumer
  • NGINX reverse proxy hostnames
  • WebSocket host configuration in Chat API
  • Example: use chat.example.com or api.example.com in place of <your-domain> throughout.

Useful Swarm operations

General management:
docker node ls
docker service ls
docker service ps <service>
docker service logs -f <service>
docker exec -it <container> bash
docker node update --availability drain <node>
docker service scale <service>=3
Stack operations:
docker stack deploy -c docker-compose.yml cometchat
docker stack rm cometchat
docker stack services cometchat
docker stack ps cometchat

Health check endpoints

ComponentURL
Dashboardhttps://app.<your-domain>
Chat APIhttps://api-us.<your-domain>/health-check
Client APIhttps://apiclient-us.<your-domain>/health-check
Management APIhttps://apimgmt.<your-domain>/health-check
Notificationshttps://notifications-us.<your-domain>/health-check
Moderationhttps://rule-us.<your-domain>/health
WebSockethttps://websocket-us.<your-domain>/v1/health
Webhookshttps://webhooks-us.<your-domain>/v1/webhooks/health-check
Replace <your-domain> with your actual domain (for example, example.com or chat.example.com).