Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: "3"
- services:
- traefik:
- image: "traefik:v2.0"
- command:
- - --entrypoints.web.address=:80
- - --providers.docker=true
- - --entrypoints.web-secure.address=:443 #Declares the web-secure entrypoint in Traefik
- # ...
- - --certificatesresolvers.le.acme.email=mygoogleemail@gmail.com
- - --certificatesresolvers.le.acme.storage=/acme.json
- - --certificatesresolvers.le.acme.tlschallenge=true
- # ...
- ports:
- - "80:80"
- - "443:443" #Docker sends requests on port 443 to Traefik on port 443
- volumes:
- - "/var/run/docker.sock:/var/run/docker.sock:ro"
- - "/home/mylinuxusername/docker/traefik/acme.json:/acme.json"
- whoami:
- image: containous/whoami:v1.3.0
- labels:
- - "traefik.http.routers.my-app.rule=Host(`whoami.subdomain.domain.tld`)"
- - "traefik.http.routers.my-app.tls=true"
- - "traefik.http.routers.my-app.tls.certresolver=le"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement