python-support-infra/stacks/mesh/docker-compose.yml

90 lines
1.8 KiB
YAML

version: "3.8"
services:
traefik:
image: traefik:v2.10
user: "5000:5000"
configs:
- source: mesh__traefik_static.toml
target: /etc/traefik/traefik.toml
uid: "5000"
gid: "5000"
- source: mesh__traefik_tls.toml
target: /etc/traefik/dynamic/tls.toml
uid: "5000"
gid: "5000"
- source: mesh__traefik_default_middlewares.toml
target: /etc/traefik/dynamic/default_middlewares.toml
uid: "5000"
gid: "5000"
- source: mesh__stack_site-support.toml
target: /data-providers/site-support.toml
uid: "5000"
gid: "5000"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- mesh__traefik_certs:/data-certs
ports:
## HTTP
- target: 80
published: 80
protocol: tcp
mode: host
## HTTPS
- target: 443
published: 443
protocol: tcp
mode: host
deploy:
mode: replicated
replicas: 1
update_config:
parallelism: 1
delay: 10s
order: stop-first
restart_policy:
condition: on-failure
delay: 10s
max_attempts: 3
window: 120s
placement:
constraints:
- node.role == manager
networks:
- mesh_public
####################
# - Resources
####################
configs:
mesh__traefik_static.toml:
external: true
mesh__traefik_tls.toml:
external: true
mesh__traefik_default_middlewares.toml:
external: true
mesh__stack_site-support.toml:
external: true
volumes:
mesh__traefik_certs:
external: true
networks:
mesh_public:
external: true