Files
the-littlest-jupyterhub/tljh/traefik.toml.tpl
Min RK a58956f14b update for traefik v2, treafik-proxy v1
- tls config is no longer allowed in static config file, add separate dynamic config
- no longer need to persist auth config ourselves (TraefikProxy handles this)
- make sure to reload proxy before reloading hub in tests
2023-05-16 11:47:23 +02:00

60 lines
1.3 KiB
Smarty

# traefik.toml static config file template
# dynamic config (e.g. TLS) goes in traefik-dynamic.toml.tpl
# enable API
[api]
[log]
level = "INFO"
# log errors, which could be proxy errors
[accessLog]
format = "json"
[accessLog.filters]
statusCodes = ["500-999"]
[accessLog.fields.headers.names]
Authorization = "redact"
Cookie = "redact"
Set-Cookie = "redact"
X-Xsrftoken = "redact"
[entryPoints]
[entryPoints.http]
address = ":{{ http['port'] }}"
[entryPoints.http.transport.respondingTimeouts]
idleTimeout = "10m"
{% if https['enabled'] %}
[entryPoints.http.http.redirections.entryPoint]
to = "https"
scheme = "https"
[entryPoints.https]
address = ":{{ https['port'] }}"
[entryPoints.https.http.tls]
options = "default"
[entryPoints.https.transport.respondingTimeouts]
idleTimeout = "10m"
{% endif %}
[entryPoints.auth_api]
address = "localhost:{{ traefik_api['port'] }}"
{% if https['enabled'] and https['letsencrypt']['email'] and https['letsencrypt']['domains'] %}
[certificateResolvers.letsencrypt.acme]
email = "{{ https['letsencrypt']['email'] }}"
storage = "acme.json"
[certificateResolvers.letsencrypt.acme.httpChallenge]
entryPoint = "http"
{% endif %}
[providers]
providersThrottleDuration = "0s"
[providers.file]
directory = "{{ traefik_dynamic_config_dir }}"
watch = true