2025-05-05 19:13:00 +00:00

26 lines
688 B
Django/Jinja

{% import 'contrib/compose_helpers.j2' as helpers with context %}
networks:
{{ helpers.default_network(254) | indent(2) }}
services:
traefik:
image: traefik:v3.4
container_name: traefik
restart: unless-stopped
env_file:
- .env.traefik
network_mode: host
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- ./rules:/rules:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- {{ base_volume_path }}/traefik/rules:/rules/extra:ro
- {{ base_volume_path }}/traefik/acme:/acme
whoami:
image: containous/whoami
container_name: whoami
labels:
- {{ helpers.traefik_labels('whoami', port='80') | indent(6) }}