Skip to content

Commit

Permalink
fix(traefik): minor fixes to conditionals in config
Browse files Browse the repository at this point in the history
  • Loading branch information
netr0m committed Jul 23, 2024
1 parent a37b28f commit 91e3cb9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions templates/etc/traefik/traefik.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ accessLog:
entryPoints:
web:
address: :80
{% if svc_traefik_http_redirect %}
http:
redirections:
entryPoint:
to: webSecure
scheme: https
permanent: true
{% endif %}

webSecure:
address: :443
Expand All @@ -33,7 +35,7 @@ entryPoints:
- "10.0.0.0/8"
- "192.168.0.0/16"
- "172.16.0.0/12"
{% if svc_domain != 'local' %}
{% if svc_domain != 'local' and svc_traefik_automatic_https %}
http:
tls:
certResolver: {{ svc_traefik_dns_challenge_provider }}
Expand All @@ -59,11 +61,11 @@ providers:
serversTransport:
insecureSkipVerify: true

{% if svc_traefik_automatic_https | bool %}
{% if svc_traefik_automatic_https %}
certificatesResolvers:
{{ svc_traefik_dns_challenge_provider }}:
acme:
{% if svc_traefik_letsencrypt_staging | bool %}
{% if svc_traefik_letsencrypt_staging %}
caServer: {{ svc_traefik_letsencrypt_staging_server }}
{% endif %}
storage: /etc/traefik/letsencrypt/acme.json
Expand Down

0 comments on commit 91e3cb9

Please sign in to comment.