Skip to content

Instantly share code, notes, and snippets.

@cosmosgenius
Created May 21, 2024 19:29
Show Gist options
  • Save cosmosgenius/3a1d36905f66ca8f4d2b75c04296b8dc to your computer and use it in GitHub Desktop.
Save cosmosgenius/3a1d36905f66ca8f4d2b75c04296b8dc to your computer and use it in GitHub Desktop.
Local routed setup
# Static configuration
log:
level: INFO
accessLog:
addInternals: false
api:
insecure: true
dashboard: true
entryPoints:
web:
address: ":80"
providers:
file:
filename: traefik_dynamic.yaml
watch: true
# Dynamic configuration
http:
routers:
apiserver:
rule: "PathPrefix(`/api`)"
service: apiserver
entryPoints: [web]
devicefarm:
rule: "PathPrefix(`/devicefarm`)"
service: devicefarm
entryPoints: [web]
websockify:
rule: "PathPrefix(`/websockify`)"
service: websockify
entryPoints: [web]
websocket:
rule: "PathPrefix(`/websocket`)"
service: websocket
entryPoints: [web]
frontend:
rule: "PathPrefix(`/`)"
service: frontend
entryPoints: [web]
services:
apiserver:
loadBalancer:
servers:
- url: "http://localhost:8000"
devicefarm:
loadBalancer:
servers:
- url: "http://localhost:8081"
websockify:
loadBalancer:
servers:
- url: "http://localhost:5900"
websocket:
loadBalancer:
servers:
- url: "http://localhost:8008"
frontend:
loadBalancer:
servers:
- url: "http://localhost:4200"
@cosmosgenius
Copy link
Author

run it using traefik --configfile traefik.toml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment