2021-11-01 23:05:14 +00:00
|
|
|
version: "3.8"
|
|
|
|
|
|
|
|
services:
|
|
|
|
guppe:
|
2022-11-06 20:43:54 +00:00
|
|
|
image: datatitian/guppe
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
2022-11-21 18:32:24 +00:00
|
|
|
replicas: 8
|
2022-11-21 17:48:48 +00:00
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- "node.labels.type==web"
|
2022-01-01 22:28:45 +00:00
|
|
|
restart: always
|
2021-11-01 23:05:14 +00:00
|
|
|
ports:
|
|
|
|
- 443:443
|
|
|
|
- 80:80
|
|
|
|
env_file: '.env'
|
|
|
|
environment:
|
|
|
|
DB_URL: 'mongodb://mongodb:27017'
|
|
|
|
PORT_HTTPS: 443
|
|
|
|
depends_on:
|
|
|
|
- mongodb
|
|
|
|
volumes:
|
|
|
|
- certs:/root/.small-tech.org/auto-encrypt
|
|
|
|
# localdev certs
|
|
|
|
- ./certs:/usr/src/guppe/certs
|
|
|
|
logging:
|
|
|
|
driver: local
|
|
|
|
options:
|
|
|
|
max-size: '10m'
|
2022-11-08 03:47:40 +00:00
|
|
|
healthcheck:
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost"]
|
|
|
|
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
|
2022-11-21 18:32:24 +00:00
|
|
|
replicas: 50
|
2022-11-21 17:48:48 +00:00
|
|
|
placement:
|
|
|
|
constraints:
|
|
|
|
- "node.labels.type==web"
|
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:
|
|
|
|
max-size: '10m'
|
|
|
|
|
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:
|
|
|
|
- "node.labels.type==database"
|
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:
|
|
|
|
max-size: '10m'
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
mongo-data:
|
|
|
|
certs:
|