42 lines
1.5 KiB
YAML
42 lines
1.5 KiB
YAML
services:
|
|
traefik:
|
|
image: traefik:v3.5
|
|
container_name: traefik
|
|
restart: unless-stopped
|
|
command:
|
|
- "--api.insecure=false"
|
|
- "--api.dashboard=true"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--providers.docker.network=proxy"
|
|
- "--entryPoints.web.address=:80"
|
|
- "--entryPoints.websecure.address=:443"
|
|
- "--entryPoints.websecure.http.tls=true"
|
|
- "--entryPoints.web.http.redirections.entryPoint.to=websecure"
|
|
- "--entryPoints.web.http.redirections.entryPoint.scheme=https"
|
|
- --serversTransport.insecureSkipVerify=true
|
|
# Let's Encrypt configuration
|
|
- "--certificatesresolvers.le.acme.email=bobrovod@national.shitposting.agency"
|
|
- "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
|
|
- "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.traefik.rule=Host(`traefik.workstation`)"
|
|
- "traefik.http.routers.traefik.entrypoints=websecure"
|
|
- "traefik.http.routers.traefik.service=api@internal"
|
|
- "traefik.http.routers.traefik.tls=true"
|
|
- "traefik.http.routers.traefik.tls.certresolver=le"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
- "8080:8080"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./certs:/certs:ro
|
|
- ./dynamic:/etc/traefik/dynamic:ro
|
|
- ./letsencrypt:/letsencrypt
|
|
networks:
|
|
- traefik-proxy
|
|
networks:
|
|
traefik-proxy:
|
|
external: true |