Skip to main content
Deploy the full stack on Docker Swarm using the provided scripts.

Initialize Docker Swarm (manager node)

docker swarm init
docker node ls

Deploy the complete infrastructure

From the repository root:
./deploy.sh
The deployment script initializes required containers, creates Docker networks and volumes, deploys all Swarm services defined in docker-compose.yml, and starts components 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, API 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 (production)

When replacing <your-domain>, update environment values for Chat API, Management API, Extensions, Notifications, Moderation, Webhooks, SQL Consumer, and NGINX reverse proxy hostnames. Ensure the WebSocket host in Chat API aligns with the chosen domain (for example, chat.example.com).

Useful production commands (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.example.com
Chat APIhttps://api-us.example.com/health-check
Client APIhttps://apiclient-us.example.com/health-check
Management APIhttps://apimgmt.example.com/health-check
Notificationshttps://notifications-us.example.com/health-check
Moderationhttps://rule-us.example.com/health
WebSockethttps://websocket-us.example.com/v1/health
Webhookshttps://webhooks-us.example.com/v1/webhooks/health-check
Replace example.com with your actual domain, such as chat.example.com.