From 1ab5b3b9fca800a0f9187eb6b7942a33ff4f5f2d Mon Sep 17 00:00:00 2001 From: Emile Date: Wed, 9 Oct 2019 12:40:20 +0200 Subject: traefik https --- docker-compose.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 6b3f885..51539ac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,16 +9,29 @@ services: - "--providers.docker=true" - "--providers.docker.exposedbydefault=false" - "--entrypoints.web.address=:80" + - "--entrypoints.websecure.address=:80" + - "--certificatesresolvers.mytlschallenge.acme.tlschallenge=true" + - "--certificatesresolvers.mytlschallenge.acme.email=hanemile@protonmail.com" + - "--certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json" - "--metrics.prometheus=true" ports: - "80:80" + - "443:443" - "8080:8080" volumes: + - "./letsencrypt:/letsencrypt" - "/var/run/docker.sock:/var/run/docker.sock:ro" labels: - "traefik.enable=true" - "traefik.http.routers.traefik.entrypoints=web" - "traefik.http.routers.traefik.rule=Host(`traefik.${HOSTNAME}`)" + - "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.traefik.middlewares=traefik-https-redirect" + - "traefik.http.routers.traefik-secure.entrypoints=websecure" + - "traefik.http.routers.traefik-secure.rule=Host(`traefik.${HOSTNAME}`)" + - "traefik.http.routers.traefik-secure.tls=true" + - "traefik.http.routers.traefik-secure.tls.certresolver=mytlschallenge" + - "traefik.http.routers.traefik-secure.service=api@internal" - "traefik.http.services.traefik.loadbalancer.server.port=8080" networks: - circus -- cgit 1.4.1