37 lines
1.1 KiB
Django/Jinja
37 lines
1.1 KiB
Django/Jinja
# ------------------------------------------------------------------------------
|
|
# Traefik Docker Compose
|
|
# Managed by Ansible — do not edit manually
|
|
# ------------------------------------------------------------------------------
|
|
|
|
services:
|
|
traefik:
|
|
image: traefik:{{ traefik_version }}
|
|
container_name: traefik
|
|
restart: unless-stopped
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
ports:
|
|
- "{{ traefik_http_port }}:80"
|
|
- "{{ traefik_https_port }}:443"
|
|
{% if traefik_dashboard_enabled %}
|
|
- "{{ traefik_dashboard_port }}:8080"
|
|
{% endif %}
|
|
env_file:
|
|
- .env
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- {{ traefik_config_dir }}/traefik.yml:/etc/traefik/traefik.yml:ro
|
|
- {{ traefik_config_dir }}/dynamic:/etc/traefik/dynamic:ro
|
|
- {{ traefik_certs_dir }}/acme.json:/certs/acme.json
|
|
{% if traefik_accesslog_enabled %}
|
|
- {{ traefik_logs_dir }}:/logs
|
|
{% endif %}
|
|
networks:
|
|
- {{ traefik_network }}
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
networks:
|
|
{{ traefik_network }}:
|
|
external: true
|