38 lines
993 B
Django/Jinja
38 lines
993 B
Django/Jinja
{% import 'contrib/compose_helpers.j2' as helpers with context %}
|
|
{##}
|
|
version: "3.9"
|
|
|
|
networks:
|
|
traefik:
|
|
internal: true
|
|
enable_ipv6: true
|
|
ipam:
|
|
config:
|
|
- subnet: {{ traefik_ip }}/24
|
|
- subnet: {{ docker_ipv6_subnet | ansible.utils.ipsubnet(80, 255) }}
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:v2.9
|
|
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/logs:/logs
|
|
- {{ base_volume_path }}/traefik/acme:/acme
|
|
|
|
# This is mostly just so that the traefik network gets created
|
|
whoami:
|
|
image: containous/whoami
|
|
container_name: whoami
|
|
labels:
|
|
- {{ helpers.traefik_labels('whoami', port=80) | indent(6) }}
|
|
networks:
|
|
- traefik
|