digitalboard.core/roles/traefik/templates/docker-compose.yml.j2
Simon Bärlocher 02d45026a5
feat: drop blanket recreates, ACME-DNS knobs, notify_push override
- Drop `recreate: always` from collabora/drawio/homarr/opencloud/traefik
  handlers and the authentik_outpost_ldap start task. `up -d` with
  `state: present` already recreates exactly the services whose
  compose definition changed; the blanket recreate was forcing
  restarts even when nothing relevant moved.
- Rewrite the `*_domains` Traefik Host loop to the `Host(\`a\`) ||
  Host(\`b\`)` form across authentik/collabora/garage/nextcloud so the
  rule still matches when traefik can't normalize the comma-form into
  the same canonical shape.
- Traefik: add `traefik_acme_tcp_only` (sets LEGO_EXPERIMENTAL_DNS_TCP_ONLY)
  and `traefik_acme_disable_ans_checks` (disables lego's authoritative-NS
  propagation check) for environments where the DNS path between the
  traefik container and the zone's nameservers is constrained.
- Traefik DMZ collector: two-step merge so a `traefik_dmz_exposed_services`
  entry that sets its own `backend_host` wins over the host fallback;
  lets a route target an internal FQDN covered by the backend cert's
  SANs instead of the raw IP.
- Nextcloud: add `nextcloud_notify_push_domain` override for the
  `occ notify_push:setup` call so the setup check can hit an internal
  FQDN instead of hairpinning through the DMZ. Push router now matches
  every entry in `nextcloud_domains`.
- Nextcloud: also %2F-escape slashes in the postgres user/password
  inside the notify_push DATABASE_URL.
2026-05-20 22:44:41 +02:00

40 lines
No EOL
1.3 KiB
Django/Jinja

services:
traefik:
image: traefik:latest
container_name: traefik
restart: always
{% if traefik_cert_mode == 'acme' %}
environment:
RFC2136_NAMESERVER: "{{ traefik_acme_dns_nameserver }}"
RFC2136_TSIG_ALGORITHM: "{{ traefik_acme_tsig_algorithm }}"
RFC2136_TSIG_KEY: "{{ traefik_acme_tsig_key }}"
RFC2136_TSIG_SECRET: "{{ traefik_acme_tsig_secret }}"
RFC2136_PROPAGATION_TIMEOUT: "{{ traefik_acme_propagation_timeout }}"
RFC2136_POLLING_INTERVAL: "{{ traefik_acme_polling_interval }}"
RFC2136_TTL: "{{ traefik_acme_ttl }}"
{% if traefik_acme_tcp_only | default(false) %}
LEGO_EXPERIMENTAL_DNS_TCP_ONLY: "true"
{% endif %}
{% endif %}
ports:
- "80:80"
- "443:443"
{% if traefik_enable_dashboard and not traefik_dashboard_domain %}
- "8080:8080"
{% endif %}
volumes:
- {{ docker_volume_dir }}/traefik.yml:/traefik.yml:ro
- {{ docker_volume_dir }}/config:/config:ro
{% if traefik_cert_mode == 'acme' %}
- {{ docker_volume_dir }}/letsencrypt:/letsencrypt
{% endif %}
{% if traefik_mode == 'backend' %}
- /var/run/docker.sock:/var/run/docker.sock:ro
{% endif %}
networks:
- {{ traefik_network }}
networks:
{{ traefik_network }}:
name: {{ traefik_network }}
external: true