Skip to content

Instantly share code, notes, and snippets.

@zerkalica
Created August 27, 2024 07:41
Show Gist options
  • Save zerkalica/03e980b9462331a05155b8c412875045 to your computer and use it in GitHub Desktop.
Save zerkalica/03e980b9462331a05155b8c412875045 to your computer and use it in GitHub Desktop.
traefik balancer
entryPoints:
http:
address: :9081
https:
address: :9082
http:
tls: {}
local_http:
address: :9091
providers:
file:
filename: traefik_http.yml
watch: true
serversTransport:
insecureSkipVerify: true
api:
insecure: true
log:
level: DEBUG #DEBUG #INFO
accessLog: {}
http:
middlewares:
cors:
headers:
accessControlAllowHeaders:
- "*"
accessControlAllowMethods:
- "GET"
- "OPTIONS"
- "PUT"
- "POST"
accessControlAllowOriginList:
- "*"
accessControlMaxAge: 100
addVaryHeader: true
routers:
s3:
service: s3
rule: PathPrefix(`/avatar/`)
middlewares: &middleware_cors
- cors
cors: &cors
service: gd
rule: PathRegexp(`^/(auth|sentry)/`)
middlewares: *middleware_cors
entryPoints: &entryPoints_prod
- http
- https
local_cors:
<<: *cors
service: &service_local_gd local_gd
entryPoints: &entryPoints_local
- local_http
api: &api
service: gd
rule: PathRegexp(`^/(api|audio-cache)/`)
entryPoints: *entryPoints_prod
local_api:
<<: *api
service: *service_local_gd
entryPoints: *entryPoints_local
root:
service: mol
rule: PathPrefix(`/`)
# tls: {}
services:
mol:
loadBalancer:
servers:
- url: http://0.0.0.0:9080
s3:
loadBalancer:
servers:
- url: https://cdn-2:443
passHostHeader: false
gd:
loadBalancer:
servers:
- url: https://dev-1:443
passHostHeader: false
local_gd:
loadBalancer:
servers:
- url: http://0.0.0.0:80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment