rubberguppe/docker-compose.yml
Will Murphy 1a10e2ce9f
High performance guppe setup (#62)
* add worker script and container

* remove port bindings from worker

* another worker

* try replicas

* 8 workers

* try replicating web server

* document docker swarm commands

* use image instead of build as required by swarm
2022-11-06 14:43:54 -06:00

57 lines
1 KiB
YAML

version: "3.8"
services:
guppe:
image: datatitian/guppe
deploy:
mode: replicated
replicas: 4
restart: always
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'
worker1:
image: datatitian/guppe
command: [ "node", "deliveryWorker.js" ]
deploy:
mode: replicated
replicas: 8
restart: always
env_file: '.env'
environment:
DB_URL: 'mongodb://mongodb:27017'
depends_on:
- mongodb
logging:
driver: local
options:
max-size: '10m'
mongodb:
image: mongo:4.2
restart: always
volumes:
- mongo-data:/data/db
logging:
driver: local
options:
max-size: '10m'
volumes:
mongo-data:
certs: