From dd0261f955ade088ef2487cdc4903d406fa0e5fd Mon Sep 17 00:00:00 2001 From: johackim Date: Thu, 10 Nov 2022 09:52:35 +0100 Subject: [PATCH] feat: add traefik admin --- stacks/traefik.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stacks/traefik.yml b/stacks/traefik.yml index 70d31527..90db3c27 100644 --- a/stacks/traefik.yml +++ b/stacks/traefik.yml @@ -7,6 +7,7 @@ services: image: traefik:${VERSION:-v2.8.3} command: # - --log.level=DEBUG + - --api.dashboard=${API_DASHBOARD:-false} - --providers.docker - --providers.docker.network=traefik-net - --providers.docker.exposedByDefault=false @@ -32,6 +33,12 @@ services: - {target: 443, published: 443, mode: host, protocol: tcp} deploy: mode: ${MODE:-replicated} + labels: + - traefik.enable=true + - traefik.http.routers.dashboard.rule=Host(`${DOMAIN:-traefik.localhost}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`)) + - traefik.http.routers.dashboard.service=api@internal + - traefik.http.routers.dashboard.middlewares=auth + - traefik.http.services.dummy-svc.loadbalancer.server.port=8080 volumes: letsencrypt: