Skip to content

Instantly share code, notes, and snippets.

@ephes
Last active November 26, 2022 08:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ephes/f5ba0222f26bcf9d914939886143edb4 to your computer and use it in GitHub Desktop.
Save ephes/f5ba0222f26bcf9d914939886143edb4 to your computer and use it in GitHub Desktop.
http:
routers:
{{ fqdn }}-web-router:
rule: "{{ traefik_host_rule }}"
entryPoints:
- web
middlewares:
- redirect
service: {{ fqdn }}-web
{{ fqdn }}-web-secure-router:
rule: "{{ traefik_host_rule }}"
entryPoints:
- web-secure
middlewares:
- sslHeaders
- gzip-compress
service: {{ fqdn }}-web
tls:
certResolver: letsencrypt
{{ fqdn }}-streaming-router:
rule: "({{ traefik_host_rule }} && PathPrefix(`/api/v1/streaming`))"
entryPoints:
- web
middlewares:
- redirect
service: {{ fqdn }}-streaming
{{ fqdn }}-streaming-secure-router:
rule: "({{ traefik_host_rule }} && PathPrefix(`/api/v1/streaming`))"
entryPoints:
- web-secure
middlewares:
- sslHeaders
service: {{ fqdn }}-streaming
tls:
certResolver: letsencrypt
middlewares:
redirect:
redirectScheme:
scheme: https
permanent: true
sslHeaders:
headers:
customRequestHeaders:
X-Forwarded-Proto: "https"
X-Forwarded-Port: "443"
gzip-compress:
compress: {}
services:
{{ fqdn }}-web:
loadBalancer:
servers:
- url: http://localhost:{{ web_port }}
{{ fqdn }}-streaming:
loadBalancer:
servers:
- url: http://localhost:{{ streaming_port }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment