traefik/compose.yml

74 lines
2.1 KiB
YAML
Raw Permalink Normal View History

2021-09-15 11:35:57 +00:00
---
2020-06-17 06:23:01 +00:00
version: "3.8"
2021-09-15 11:35:57 +00:00
2020-06-17 06:23:01 +00:00
services:
2020-10-27 07:44:08 +00:00
app:
2021-12-28 02:38:36 +00:00
image: "traefik:v2.5.6"
# Note(decentral1se): *please do not* add any additional ports here.
# Doing so could break new installs with port conflicts. Please use
2021-05-10 10:58:10 +00:00
# the usual `compose.$app.yml` approach for any additional ports
2020-06-17 06:23:01 +00:00
ports:
- "80:80"
- "443:443"
2020-06-17 06:23:01 +00:00
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt"
configs:
- source: traefik_yml
target: /etc/traefik/traefik.yml
2020-10-27 11:19:10 +00:00
- source: file_provider_yml
target: /etc/traefik/file-provider.yml
- source: entrypoint
target: /custom-entrypoint.sh
mode: 0555
2020-06-17 06:23:01 +00:00
networks:
- proxy
environment:
- DASHBOARD_ENABLED
- LOG_LEVEL
- LETS_ENCRYPT_EMAIL
- LETS_ENCRYPT_ENV
healthcheck:
test: ["CMD", "traefik", "healthcheck"]
interval: 30s
timeout: 10s
retries: 10
start_period: 1m
command: traefik
entrypoint: /custom-entrypoint.sh
2020-06-17 06:23:01 +00:00
deploy:
update_config:
failure_action: rollback
order: start-first
2020-06-17 06:23:01 +00:00
labels:
- "traefik.enable=true"
- "traefik.http.services.traefik.loadbalancer.server.port=web"
- "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.traefik.entrypoints=web-secure"
- "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}"
2020-10-27 11:19:10 +00:00
- "traefik.http.routers.traefik.tls.options=default@file"
2020-06-17 06:23:01 +00:00
- "traefik.http.routers.traefik.service=api@internal"
2020-10-27 11:19:10 +00:00
- "traefik.http.routers.traefik.middlewares=security@file"
2021-12-28 02:38:36 +00:00
- "coop-cloud.${STACK_NAME}.version=1.0.1+v2.5.6"
2021-09-15 11:35:57 +00:00
2020-06-17 06:23:01 +00:00
networks:
proxy:
external: true
2021-09-15 11:35:57 +00:00
2020-06-17 06:23:01 +00:00
configs:
traefik_yml:
name: ${STACK_NAME}_traefik_yml_${TRAEFIK_YML_VERSION}
2021-05-10 11:53:27 +00:00
file: traefik.yml.tmpl
template_driver: golang
2020-10-27 11:19:10 +00:00
file_provider_yml:
name: ${STACK_NAME}_file_provider_yml_${FILE_PROVIDER_YML_VERSION}
2021-05-10 11:53:27 +00:00
file: file-provider.yml.tmpl
template_driver: golang
entrypoint:
name: ${STACK_NAME}_entrypoint_${ENTRYPOINT_VERSION}
file: entrypoint.sh.tmpl
template_driver: golang
2021-09-15 11:35:57 +00:00
2020-06-17 06:23:01 +00:00
volumes:
letsencrypt: