From 15893104c48f85064d74fad9022f68076e1db6cd Mon Sep 17 00:00:00 2001 From: MatthiasCzech Date: Sun, 3 Feb 2019 02:50:48 +0100 Subject: [PATCH] Nach Dokumentation angepasst: https://docs.traefik.io/user-guide/docker-and-lets-encrypt/ --- config/acme.json | 0 config/traefik.toml | 89 +++++++++++++++++++++++++------------- docker-compose.traefik.yml | 7 +-- 3 files changed, 63 insertions(+), 33 deletions(-) create mode 100644 config/acme.json diff --git a/config/acme.json b/config/acme.json new file mode 100644 index 0000000..e69de29 diff --git a/config/traefik.toml b/config/traefik.toml index 79201ce..2939578 100644 --- a/config/traefik.toml +++ b/config/traefik.toml @@ -1,22 +1,65 @@ -[api] -debug = false -dashboard = true -logLevel = "DEBUG" +# [api] +# debug = false +# dashboard = true +# logLevel = "DEBUG" -defaultEntryPoints = ["https", "http"] +# defaultEntryPoints = ["https", "http"] + +# [entryPoints] +# [entryPoints.http] +# address = ":80" +# [entryPoints.http.redirect] +# entryPoint = "https" +# [entryPoints.http.auth.basic] +# users = ["McSeeno:$2y$13$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW"] +# [entryPoints.https] +# address = ":443" +# [entryPoints.https.auth.basic] +# users = ["McSeeno:$2y$13$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW"] +# [entryPoints.https.tls] + +# [retry] + +# [docker] +# endpoint = "unix:///var/run/docker.sock" +# domain = "uvnsvdjwhkosuuub.myfritz.net" +# watch = true +# exposedByDefault = false + +# [acme] +# email = "regs@mcseeno.de" +# storage = "acme.json" +# entryPoint = "https" +# onHostRule = true +# # [[acme.domains]] +# # main = "uvnsvdjwhkosuuub.myfritz.net" +# [acme.httpChallenge] +# entryPoint = "http" + +# [frontends] +# [frontends.dokuwiki] +# backend = "dokuwiki" +# [frontends.dokuwiki.routes.wiki] +# rule = "Host:localhost,192.168.2.79,uvnsvdjwhkosuuub.myfritz.net;Path:/wiki" + +# [backends] +# [backends.dokuwiki] +# [backends.dokuwiki.servers.wiki] +# url = "http://172.17.0.2:80" + +debug = false + +logLevel = "ERROR" +defaultEntryPoints = ["https","http"] [entryPoints] - [entryPoints.http] - address = ":80" - [entryPoints.http.redirect] - entryPoint = "https" - [entryPoints.http.auth.basic] - users = ["McSeeno:$2y$13$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW"] - [entryPoints.https] - address = ":443" - [entryPoints.https.auth.basic] - users = ["McSeeno:$2y$13$maYBYazCRDGmcKdSy/QA0eWBUEIpobxcUy.z68fnifcpoCqWm18wW"] - [entryPoints.https.tls] + [entryPoints.http] + address = ":80" + [entryPoints.http.redirect] + entryPoint = "https" + [entryPoints.https] + address = ":443" + [entryPoints.https.tls] [retry] @@ -31,19 +74,5 @@ email = "regs@mcseeno.de" storage = "acme.json" entryPoint = "https" onHostRule = true -# [[acme.domains]] -# main = "uvnsvdjwhkosuuub.myfritz.net" [acme.httpChallenge] entryPoint = "http" - -[frontends] - [frontends.dokuwiki] - backend = "dokuwiki" - [frontends.dokuwiki.routes.wiki] - rule = "Host:localhost,192.168.2.79,uvnsvdjwhkosuuub.myfritz.net;Path:/wiki" - -[backends] -[backends.dokuwiki] -[backends.dokuwiki.servers.wiki] -url = "http://172.17.0.2:80" - diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 7c6e59a..8ddf16f 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -9,6 +9,7 @@ version: '2' networks: traefik: + external: true services: traefik: @@ -17,15 +18,15 @@ services: environment: - PUID=1000 - PGID=1000 - devices: - - "/dev/dvb:/dev/dvb" ports: - "80:80" - "443:443" - - "8080:8080" +# - "8080:8080" networks: - traefik volumes: - /docker/traefik/config/traefik.toml:/etc/traefik/traefik.toml + - /docker/traefik/config/acme.json:/acme.json - /var/run/docker.sock:/var/run/docker.sock + container_name: traefik