2021-11-01 23:05:14 +00:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
2023-01-27 18:44:49 +00:00
|
|
|
proxy:
|
|
|
|
image: valian/docker-nginx-auto-ssl
|
2023-01-27 18:50:47 +00:00
|
|
|
deploy:
|
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- "node.labels.web==true"
|
2023-01-27 18:44:49 +00:00
|
|
|
restart: always
|
|
|
|
ports:
|
2023-06-23 16:24:22 +00:00
|
|
|
- mode: host
|
|
|
|
protocol: tcp
|
|
|
|
published: 80
|
|
|
|
target: 80
|
|
|
|
- mode: host
|
|
|
|
protocol: tcp
|
|
|
|
published: 443
|
|
|
|
target: 443
|
2023-01-27 18:44:49 +00:00
|
|
|
volumes:
|
|
|
|
- ssl_data:/etc/resty-auto-ssl
|
2023-01-27 19:31:59 +00:00
|
|
|
depends_on:
|
|
|
|
- guppe
|
2023-01-27 18:44:49 +00:00
|
|
|
env_file: '.env'
|
2023-06-23 16:24:22 +00:00
|
|
|
logging:
|
|
|
|
driver: local
|
|
|
|
options:
|
|
|
|
max-size: '100m'
|
2021-11-01 23:05:14 +00:00
|
|
|
guppe:
|
2022-11-06 20:43:54 +00:00
|
|
|
image: datatitian/guppe
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
2023-01-27 18:44:49 +00:00
|
|
|
replicas: 4
|
2022-11-21 17:48:48 +00:00
|
|
|
placement:
|
|
|
|
constraints:
|
2023-01-27 18:44:49 +00:00
|
|
|
- "node.labels.web==true"
|
2022-01-01 22:28:45 +00:00
|
|
|
restart: always
|
2021-11-01 23:05:14 +00:00
|
|
|
env_file: '.env'
|
|
|
|
environment:
|
|
|
|
DB_URL: 'mongodb://mongodb:27017'
|
2023-01-27 18:44:49 +00:00
|
|
|
PROXY_MODE: 1
|
2021-11-01 23:05:14 +00:00
|
|
|
depends_on:
|
|
|
|
- mongodb
|
|
|
|
logging:
|
|
|
|
driver: local
|
|
|
|
options:
|
2023-06-23 16:24:22 +00:00
|
|
|
max-size: '100m'
|
2022-11-08 03:47:40 +00:00
|
|
|
healthcheck:
|
2023-01-27 19:31:59 +00:00
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8085"]
|
2022-11-08 03:47:40 +00:00
|
|
|
interval: 1m30s
|
|
|
|
timeout: 10s
|
|
|
|
retries: 3
|
|
|
|
start_period: 30s
|
|
|
|
|
2022-11-06 20:43:54 +00:00
|
|
|
worker1:
|
|
|
|
image: datatitian/guppe
|
|
|
|
command: [ "node", "deliveryWorker.js" ]
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
2023-01-27 18:44:49 +00:00
|
|
|
replicas: 25
|
2022-11-21 17:48:48 +00:00
|
|
|
placement:
|
|
|
|
constraints:
|
2023-01-27 18:44:49 +00:00
|
|
|
- "node.labels.delivery==true"
|
2022-11-06 20:43:54 +00:00
|
|
|
restart: always
|
|
|
|
env_file: '.env'
|
|
|
|
environment:
|
|
|
|
DB_URL: 'mongodb://mongodb:27017'
|
|
|
|
depends_on:
|
|
|
|
- mongodb
|
|
|
|
logging:
|
|
|
|
driver: local
|
|
|
|
options:
|
2023-06-23 16:24:22 +00:00
|
|
|
max-size: '100m'
|
2022-11-06 20:43:54 +00:00
|
|
|
|
2021-11-01 23:05:14 +00:00
|
|
|
mongodb:
|
|
|
|
image: mongo:4.2
|
2022-11-21 17:48:48 +00:00
|
|
|
deploy:
|
|
|
|
mode: replicated
|
|
|
|
replicas: 1
|
|
|
|
placement:
|
|
|
|
constraints:
|
2023-01-27 18:44:49 +00:00
|
|
|
- "node.labels.database==true"
|
2022-01-01 22:28:45 +00:00
|
|
|
restart: always
|
2021-11-01 23:05:14 +00:00
|
|
|
volumes:
|
|
|
|
- mongo-data:/data/db
|
|
|
|
logging:
|
|
|
|
driver: local
|
|
|
|
options:
|
2023-06-23 16:24:22 +00:00
|
|
|
max-size: '100m'
|
2021-11-01 23:05:14 +00:00
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo-data:
|
2023-01-27 18:48:29 +00:00
|
|
|
ssl_data:
|