2023-05-15 10:53:53 +02:00
|
|
|
# traefik.toml dynamic config (mostly TLS)
|
|
|
|
|
# dynamic config in the static config file will be ignored
|
|
|
|
|
{% if https['enabled'] %}
|
|
|
|
|
[tls]
|
|
|
|
|
[tls.options.default]
|
|
|
|
|
minVersion = "VersionTLS12"
|
|
|
|
|
|
2023-05-16 13:05:34 +02:00
|
|
|
{% if https['tls']['cert'] -%}
|
2023-05-15 10:53:53 +02:00
|
|
|
[tls.stores.default.defaultCertificate]
|
|
|
|
|
certFile = "{{ https['tls']['cert'] }}"
|
|
|
|
|
keyFile = "{{ https['tls']['key'] }}"
|
2023-05-16 13:05:34 +02:00
|
|
|
{%- endif %}
|
2023-05-15 10:53:53 +02:00
|
|
|
|
2023-05-16 13:05:34 +02:00
|
|
|
{% if https['letsencrypt']['email'] and https['letsencrypt']['domains'] -%}
|
2023-05-15 10:53:53 +02:00
|
|
|
[tls.stores.default.defaultGeneratedCert]
|
|
|
|
|
resolver = "letsencrypt"
|
|
|
|
|
[tls.stores.default.defaultGeneratedCert.domain]
|
|
|
|
|
main = "{{ https['letsencrypt']['domains'][0] }}"
|
|
|
|
|
sans = [
|
2023-05-16 13:05:34 +02:00
|
|
|
{% for domain in https['letsencrypt']['domains'][1:] -%}
|
2023-05-15 10:53:53 +02:00
|
|
|
"{{ domain }}",
|
2023-05-16 13:05:34 +02:00
|
|
|
{%- endfor %}
|
2023-05-15 10:53:53 +02:00
|
|
|
]
|
2023-05-16 13:05:34 +02:00
|
|
|
{%- endif %}
|
2023-05-15 10:53:53 +02:00
|
|
|
{% endif %}
|