From 8a86a1743b5df7c995909d093a80ee76440a732e Mon Sep 17 00:00:00 2001 From: Paul Date: Sun, 1 Dec 2019 07:47:00 +0100 Subject: [PATCH] Improve traefik configuration, add dashboard --- config/traefik.toml | 10 +++++++++- docker-compose.yml | 15 ++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/config/traefik.toml b/config/traefik.toml index ade42a6..c72af33 100644 --- a/config/traefik.toml +++ b/config/traefik.toml @@ -2,6 +2,9 @@ checkNewVersion = false sendAnonymousUsage = false +[serversTransport] + insecureSkipVerify = true + [entryPoints] [entryPoints.web] address = ":80" @@ -10,7 +13,7 @@ address = ":443" [log] - level = "DEBUG" + level = "INFO" [accessLog] format = "common" @@ -19,6 +22,11 @@ [api] dashboard = true +[metrics] + [metrics.prometheus] + entryPoint = "traefik" + buckets = [0.1,0.3,1.2,5.0] + [ping] [providers.docker] diff --git a/docker-compose.yml b/docker-compose.yml index 58b0a00..72df37a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -20,21 +20,18 @@ services: - "traefik.http.routers.http-catchall.entrypoints=web" - "traefik.http.routers.http-catchall.middlewares=redirect-to-https" - - "traefik.backend=proxy" - - "traefik.port=8080" # Password middleware - #- "traefik.http.middlewares.auth.basicauth.users=zombi:zombibi0815" - # Dashboard - - "traefik.http.routers.dashboard.rule=host(`test.zom.bi`)" + - "traefik.http.middlewares.simpleauth.basicauth.users=zombi:$$apr1$$kv8xG9wi$$4UPHqcvKnYUab/tts6ZIU1" + # Dashboard, running at https://zom.bi/dashboard/ + - "traefik.http.routers.dashboard.rule=Host(`zom.bi`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))" - "traefik.http.routers.dashboard.entrypoints=websecure" - - "traefik.http.routers.dashboard.tls=true" - "traefik.http.routers.dashboard.service=api@internal" + - "traefik.http.routers.dashboard.middlewares=simpleauth" + - "traefik.http.routers.dashboard.tls=true" - "traefik.http.routers.dashboard.tls.certresolver=default" - "traefik.http.routers.dashboard.tls.domains[0].main=zom.bi" - "traefik.http.routers.dashboard.tls.domains[0].sans=conference.zom.bi,mumble.zom.bi,mx.zom.bi,user.zom.bi,xmpp.zom.bi,irc.zom.bi,api.zom.bi,autoconfig.zom.bi,blog.zom.bi,cloud.zom.bi,docker.zom.bi,download.zom.bi,gdpr.zom.bi,git.zom.bi,kanban.zom.bi,mail.zom.bi,music.zom.bi,org.zom.bi,ovpn.zom.bi,pad.zom.bi,push.zom.bi,static.zom.bi,stream.zom.bi,tube.zom.bi,upload.zom.bi,wiki.zom.bi,www.zom.bi,test.zom.bi" - #- "traefik.http.routers.dashboard.middlewares=auth" - - - "traefik.http.services.dashboard.loadbalancer.server.port=8080" + - "traefik.docker.network=proxy_web" networks: - "web"