First working https

This commit is contained in:
Simon 2019-10-29 20:45:42 +01:00
parent 6ca52a8c3c
commit bf3a47016d
2 changed files with 19 additions and 8 deletions

View File

@ -79,8 +79,9 @@ services:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)" - "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
- "traefik.http.routers.whoami.entrypoints=web" - "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.routers.whoami.entrypoints=web-secure" - "traefik.http.routers.whoami-secure.entrypoints=web-secure"
- "traefik.http.routers.whoami.tls.certresolver=sample" - "traefik.http.routers.whoami-secure.rule=Host(`whoami.${DOMAIN}`)"
- "traefik.http.routers.whoami-secure.tls.certresolver=default"
mqtt: mqtt:
image: eclipse-mosquitto:1.6.7 image: eclipse-mosquitto:1.6.7
@ -157,19 +158,25 @@ services:
ports: ports:
# The HTTP port # The HTTP port
- "80:80" - "80:80"
- "443:443"
- "8080:8080" - "8080:8080"
volumes: volumes:
# So that Traefik can listen to the Docker events # So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- ./traefik.yml:/etc/traefik/traefik.yml - ./traefik.yml:/etc/traefik/traefik.yml
- ./static_config.yml:/etc/traefik/static_config.yml - ./static_config.yml:/etc/traefik/static_config.yml
- ./acme.json:/acme.json # - "./log.json:/etc/traefik/log.json"
- "./letsencrypt:/letsencrypt" # - "./traefik/acme.json:/acme.json"
dns:
- 8.8.8.8
labels: labels:
- "traefik.http.routers.traefik.rule=Host(`tr.${DOMAIN}`)" - "traefik.http.routers.traefik.rule=Host(`tr.${DOMAIN}`)"
- "traefik.http.routers.traefik.entrypoints=web" - "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik-secure.entrypoints=web-secure"
- "traefik.http.routers.traefik-secure.rule=Host(`tr.${DOMAIN}`)"
- "traefik.http.routers.traefik-secure.tls.certresolver=default"
- "traefik.http.routers.traefik-secure.tls=true"
- "traefik.http.services.traefik-service.loadbalancer.server.port=8080" - "traefik.http.services.traefik-service.loadbalancer.server.port=8080"
- "traefik.enable=true" - "traefik.enable=true"

View File

@ -15,12 +15,16 @@ providers:
filename: "/etc/traefik/static_config.yml" filename: "/etc/traefik/static_config.yml"
watch: true watch: true
log:
level: DEBUG
# filePath: /etc/traefik/log.json
# format: json
certificatesResolvers: certificatesResolvers:
sample: default:
acme: acme:
email: simon@milvert.com email: simon@milvert.com
storage: acme.json storage: "acme.json"
httpChallenge: httpChallenge:
# used during the challenge # used during the challenge
entryPoint: web entryPoint: web
@ -29,7 +33,7 @@ certificatesResolvers:
entryPoints: entryPoints:
web: web:
address: ":80" address: ":80"
web-sercure: web-secure:
address: ":443" address: ":443"
mqtt: mqtt:
address: ":9001" address: ":9001"