Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
version: '3.7'
services:
traefik:
image: traefik:latest
command:
- --entrypoints.http.address=:80
- --entrypoints.https.address=:443
- --providers.docker
- --certificatesresolvers.mytlschallenge.acme.tlschallenge=true
- --certificatesresolvers.mytlschallenge.acme.email=noreply@ethibox.fr
- --certificatesresolvers.mytlschallenge.acme.storage=/letsencrypt/acme.json
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- letsencrypt:/letsencrypt
labels:
- traefik.http.routers.https-redirect.entrypoints=http
- traefik.http.routers.https-redirect.rule=HostRegexp(`{any:.*}`)
- traefik.http.routers.https-redirect.middlewares=https-redirect
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
volumes:
letsencrypt:
networks:
default:
external: true
name: traefik-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.