|
|
@@ -27,11 +27,21 @@ services:
|
|
|
- traefik_certs:/var/traefik/certs/:rw
|
|
|
{% endif %}
|
|
|
{% endif %}
|
|
|
- {% if traefik_tls_enabled and not swarm_enabled %}
|
|
|
- - ./.env.secret:/.env.secret:ro
|
|
|
- {% endif %}
|
|
|
+ {% if not swarm_enabled %}
|
|
|
env_file:
|
|
|
- ./.env
|
|
|
+ {% endif %}
|
|
|
+ environment:
|
|
|
+ - TZ={{ container_timezone }}
|
|
|
+ {% if traefik_tls_enabled %}
|
|
|
+ {% if traefik_tls_acme_provider == 'cloudflare' %}
|
|
|
+ {% if swarm_enabled %}
|
|
|
+ - CF_DNS_API_TOKEN_FILE=/run/secrets/{{ traefik_tls_acme_secret_name }}
|
|
|
+ {% else %}
|
|
|
+ - CF_DNS_API_TOKEN=${CF_DNS_API_TOKEN}
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
+ {% endif %}
|
|
|
{% if swarm_enabled %}
|
|
|
configs:
|
|
|
- source: traefik_config
|
|
|
@@ -43,15 +53,6 @@ services:
|
|
|
- source: traefik_services
|
|
|
target: /etc/traefik/files/services.yaml
|
|
|
{% endif %}
|
|
|
- environment:
|
|
|
- - TZ={{ container_timezone }}
|
|
|
- {% if traefik_tls_enabled and traefik_tls_acme_provider == 'cloudflare' %}
|
|
|
- {% if swarm_enabled %}
|
|
|
- - CF_DNS_API_TOKEN_FILE=/run/secrets/{{ traefik_tls_acme_secret_name }}
|
|
|
- {% else %}
|
|
|
- - CF_DNS_API_TOKEN_FILE=/.env.secret
|
|
|
- {% endif %}
|
|
|
- {% endif %}
|
|
|
healthcheck:
|
|
|
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
|
|
interval: 30s
|