Skip to content

Instantly share code, notes, and snippets.

@cosmosgenius
Created May 21, 2024 19:29
Show Gist options
  • Select an option

  • Save cosmosgenius/3a1d36905f66ca8f4d2b75c04296b8dc to your computer and use it in GitHub Desktop.

Select an option

Save cosmosgenius/3a1d36905f66ca8f4d2b75c04296b8dc to your computer and use it in GitHub Desktop.

Revisions

  1. cosmosgenius created this gist May 21, 2024.
    17 changes: 17 additions & 0 deletions traefik.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    # 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
    45 changes: 45 additions & 0 deletions traefik_dynamic.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # 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"