36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
################################################################
|
|
# https://doc.traefik.io/traefik/getting-started/quick-start/
|
|
# https://github.com/chudaozhe/traefik-samples/blob/main/docker-compose.yml
|
|
################################################################
|
|
|
|
version: "3"
|
|
|
|
services:
|
|
traefik-reverse-proxy:
|
|
# The official v3 Traefik docker image
|
|
image: traefik:v3.1
|
|
command:
|
|
# Enables the web UI and tells Traefik to listen to docker
|
|
- --api.insecure=true
|
|
- --providers.docker
|
|
|
|
- --entryPoints.web.address=:80
|
|
- --entryPoints.websecure.address=:443
|
|
|
|
# https://doc.traefik.io/traefik/https/acme/
|
|
- --certificatesresolvers.myresolver.acme.email=i@oo1.dev
|
|
- --certificatesresolvers.myresolver.acme.storage=acme.json
|
|
|
|
# used during the challenge
|
|
- --certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web
|
|
ports:
|
|
# The HTTP port
|
|
- "80:80"
|
|
- "443:443"
|
|
# The Web UI (enabled by --api.insecure=true)
|
|
- "8080:8080"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
- ./acme.json:/acme.json # chmod 600 ./acme.json
|
|
# environment: # https://doc.traefik.io/traefik/reference/static-configuration/env/
|