- 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.
90 lines
3.5 KiB
Django/Jinja
90 lines
3.5 KiB
Django/Jinja
services:
|
|
postgres:
|
|
image: {{ authentik_postgres_image }}
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: {{ authentik_postgres_db }}
|
|
POSTGRES_USER: {{ authentik_postgres_user }}
|
|
POSTGRES_PASSWORD: {{ authentik_postgres_password }}
|
|
volumes:
|
|
- {{ authentik_docker_volume_dir }}/postgresql:/var/lib/postgresql/data
|
|
networks:
|
|
- {{ authentik_backend_network }}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -d {{ authentik_postgres_db }} -U {{ authentik_postgres_user }}"]
|
|
start_period: 20s
|
|
interval: 30s
|
|
retries: 5
|
|
timeout: 5s
|
|
|
|
server:
|
|
image: {{ authentik_image }}
|
|
restart: unless-stopped
|
|
command: server
|
|
healthcheck:
|
|
test: ["CMD", "ak", "healthcheck"]
|
|
start_period: 30s
|
|
interval: 10s
|
|
retries: 5
|
|
timeout: 5s
|
|
environment:
|
|
AUTHENTIK_SECRET_KEY: {{ authentik_secret_key }}
|
|
AUTHENTIK_POSTGRESQL__HOST: postgres
|
|
AUTHENTIK_POSTGRESQL__NAME: {{ authentik_postgres_db }}
|
|
AUTHENTIK_POSTGRESQL__USER: {{ authentik_postgres_user }}
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: {{ authentik_postgres_password }}
|
|
AUTHENTIK_LOG_LEVEL: {{ authentik_log_level }}
|
|
AUTHENTIK_ERROR_REPORTING__ENABLED: "{{ authentik_error_reporting_enabled | lower }}"
|
|
volumes:
|
|
- {{ authentik_docker_volume_dir }}/blueprints:/blueprints/custom
|
|
- {{ authentik_docker_volume_dir }}/data:/data
|
|
- {{ authentik_docker_volume_dir }}/templates:/templates
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- {{ authentik_backend_network }}
|
|
- {{ authentik_traefik_network }}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.docker.network={{ authentik_traefik_network }}
|
|
- traefik.http.routers.{{ authentik_service_name }}.rule={% for d in authentik_domains %}Host(`{{ d }}`){% if not loop.last %} || {% endif %}{% endfor +%}
|
|
{% if authentik_use_ssl %}
|
|
- traefik.http.routers.{{ authentik_service_name }}.entrypoints=websecure
|
|
- traefik.http.routers.{{ authentik_service_name }}.tls=true
|
|
{% if traefik_cert_mode | default('selfsigned') == 'acme' %}
|
|
- traefik.http.routers.{{ authentik_service_name }}.tls.certresolver={{ traefik_ssl_cert_resolver | default('dns') }}
|
|
{% endif %}
|
|
{% else %}
|
|
- traefik.http.routers.{{ authentik_service_name }}.entrypoints=web
|
|
{% endif %}
|
|
- traefik.http.services.{{ authentik_service_name }}.loadbalancer.server.port={{ authentik_port }}
|
|
|
|
worker:
|
|
image: {{ authentik_image }}
|
|
restart: unless-stopped
|
|
command: worker
|
|
user: root
|
|
environment:
|
|
AUTHENTIK_SECRET_KEY: {{ authentik_secret_key }}
|
|
AUTHENTIK_POSTGRESQL__HOST: postgres
|
|
AUTHENTIK_POSTGRESQL__NAME: {{ authentik_postgres_db }}
|
|
AUTHENTIK_POSTGRESQL__USER: {{ authentik_postgres_user }}
|
|
AUTHENTIK_POSTGRESQL__PASSWORD: {{ authentik_postgres_password }}
|
|
AUTHENTIK_LOG_LEVEL: {{ authentik_log_level }}
|
|
AUTHENTIK_ERROR_REPORTING__ENABLED: "{{ authentik_error_reporting_enabled | lower }}"
|
|
volumes:
|
|
- {{ authentik_docker_volume_dir }}/data:/data
|
|
- {{ authentik_docker_volume_dir }}/certs:/certs
|
|
- {{ authentik_docker_volume_dir }}/templates:/templates
|
|
- {{ authentik_docker_volume_dir }}/blueprints:/blueprints/custom
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
networks:
|
|
- {{ authentik_backend_network }}
|
|
|
|
networks:
|
|
{{ authentik_backend_network }}:
|
|
{{ authentik_traefik_network }}:
|
|
external: true
|