Skip to content

Docker Swarm (Production) ​

OmniNet includes a docker-stack.yml for production-grade deployment using Docker Swarm.

Initialize Swarm ​

bash
docker swarm init

Deploy the Stack ​

bash
cd omninet-microservices
docker stack deploy -c docker-stack.yml omninet

Monitor Services ​

bash
# List all services and replica counts
docker stack services omninet

# View logs for a service
docker service logs omninet_api-gateway
docker service logs omninet_ai-service --follow

# Check task (container) status
docker service ps omninet_auth-service

Scale Services ​

bash
# Scale AI service to 2 replicas
docker service scale omninet_ai-service=2

Update a Service (Rolling Deploy) ​

bash
docker service update \
  --image ghcr.io/surendra1341/omninet-ai-service:latest \
  omninet_ai-service

Remove the Stack ​

bash
docker stack rm omninet

Production Recommendations ​

ConcernRecommendation
SecretsUse Docker Secrets instead of .env
TLSAdd Traefik or nginx as a reverse proxy with Let's Encrypt
MonitoringAdd Prometheus + Grafana for service metrics
LoggingShip logs to ELK stack or Loki
BackupsEnable automated PostgreSQL and MinIO backups
ReplicasRun 2+ replicas of stateless services (gateway, notes, ai)
HealthchecksAll services expose /actuator/health

Released under the MIT License.