react-project/templates/docker-compose-traefik.yml
2024-02-28 12:42:50 +02:00

30 lines
872 B
YAML

version: "3.9"
services:
traefik:
image: traefik:v2.11
ports:
- "80:80"
- "443:443"
- "8080:8080"
volumes:
- "{{ config_dir }}/traefik.toml:/etc/traefik/traefik.toml:ro"
- "{{ config_dir }}/traefik-config:/etc/traefik-config:ro"
- "{{ config_dir }}/certs:/certs:ro"
- "/var/run/docker.sock:/var/run/docker.sock:ro"
labels:
traefik.enable: 'true'
traefik.http.routers.dashboard-secure.rule: 'Host(`{{ traefik_dashboard_hostname }}`)'
traefik.http.routers.dashboard-secure.service: 'api@internal'
traefik.http.routers.dashboard-secure.middlewares: 'auth@file'
traefik.http.routers.dashboard-secure.entrypoints: 'https'
traefik.http.routers.dashboard-secure.tls: 'true'
restart: always
networks:
- http
networks:
http:
external: true
name: traefik_http