traefik/compose.yml

74 lines
2.2 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:
2024-04-14 20:38:48 +00:00
image: "traefik:v2.11.2"
# 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"
2023-04-20 19:19:47 +00:00
- "file-providers:/etc/traefik/file-providers"
2020-06-17 06:23:01 +00:00
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
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.${STACK_NAME}.loadbalancer.server.port=web"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "traefik.http.routers.${STACK_NAME}.service=api@internal"
- "traefik.http.routers.${STACK_NAME}.middlewares=security@file"
2024-04-14 20:38:48 +00:00
- "coop-cloud.${STACK_NAME}.version=2.6.3+v2.11.2"
2023-04-18 16:36:09 +00:00
- "coop-cloud.${STACK_NAME}.timeout=${TIMEOUT:-120}"
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:
2023-04-20 19:19:47 +00:00
file-providers: