version: "3.8" services: proxy: image: valian/docker-nginx-auto-ssl deploy: placement: constraints: - "node.labels.web==true" restart: always ports: - mode: host protocol: tcp published: 80 target: 80 - mode: host protocol: tcp published: 443 target: 443 volumes: - ssl_data:/etc/resty-auto-ssl depends_on: - guppe env_file: '.env' logging: driver: local options: max-size: '100m' guppe: image: datatitian/guppe deploy: mode: replicated replicas: 4 placement: constraints: - "node.labels.web==true" restart: always env_file: '.env' environment: DB_URL: 'mongodb://mongodb:27017' PROXY_MODE: 1 depends_on: - mongodb logging: driver: local options: max-size: '100m' healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8085"] interval: 1m30s timeout: 10s retries: 3 start_period: 30s worker1: image: datatitian/guppe command: [ "node", "deliveryWorker.js" ] deploy: mode: replicated replicas: 25 placement: constraints: - "node.labels.delivery==true" restart: always env_file: '.env' environment: DB_URL: 'mongodb://mongodb:27017' depends_on: - mongodb logging: driver: local options: max-size: '100m' mongodb: image: mongo:4.2 deploy: mode: replicated replicas: 1 placement: constraints: - "node.labels.database==true" restart: always volumes: - mongo-data:/data/db logging: driver: local options: max-size: '100m' volumes: mongo-data: ssl_data: