decla-red/infrastructure/docker-compose.yml
schmelczerandras 84639669d6 Add swarmpit
2020-07-29 12:43:34 +02:00

66 lines
1.3 KiB
YAML

version: "3.8"
services:
ingress:
init: true
image: ${CONTAINER_REGISTRY}/declared-ingress
depends_on:
- frontend
networks:
- swarmpit_network
- network
deploy:
replicas: 2
resources:
limits:
cpus: "0.6"
memory: 32M
reservations:
cpus: "0.2"
memory: 32M
update_config:
parallelism: 1
failure_action: rollback
delay: 10s
monitor: 10s
restart_policy:
condition: on-failure
window: 30s
ports:
- "80:80"
- "443:443"
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
volumes:
- /etc/letsencrypt:/etc/letsencrypt
frontend:
init: true
image: ${CONTAINER_REGISTRY}/declared-frontend
ports:
- "80"
networks:
- network
deploy:
replicas: 2
resources:
limits:
cpus: "0.1"
memory: 32M
reservations:
cpus: "0.1"
memory: 32M
update_config:
parallelism: 1
failure_action: rollback
delay: 10s
monitor: 10s
restart_policy:
condition: on-failure
window: 30s
networks:
network:
driver: overlay
swarmpit_network:
external: true