project_conquer/deployment/traefik/docker-compose.yaml

68 lines
2.0 KiB
YAML

version: "3.3"
services:
traefik:
platform: linux/arm64
image: "traefik:v3.0"
container_name: "traefik"
restart: always
ports:
- "80:80"
- "443:443"
- "8888:8080"
command:
- --docker
- --debug=true
- --logLevel=DEBUG
labels:
traefik.enable: true
# Dashboard
traefik.http.middlewares.traefik-auth.basicauth.removeheader: true
traefik.http.middlewares.traefik-auth.basicauth.users: foobar:$$2y$$05$$z2KwKI.GmZ43BbwfmPPKw.CSl3rqQ0OhzBbdom.orfsMVKGLW/Xeu
traefik.http.routers.traefik.rule: Host(`traefik.project-conquer.com`)
traefik.http.routers.traefik.service: api@internal
traefik.http.routers.traefik.tls.certresolver: le
traefik.http.routers.traefik.entrypoints: websecure
traefik.http.routers.traefik.middlewares: traefik-auth
traefik.http.services.traefik.loadbalancer.server.port: 8080
# global redirect to https
traefik.http.routers.http-catchall.rule: hostregexp(`{host:.+}`)
traefik.http.routers.http-catchall.entrypoints: web
traefik.http.routers.http-catchall.middlewares: redirect-to-https
# middleware redirect
traefik.http.middlewares.redirect-to-https.redirectscheme.scheme: https
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./traefik.yml:/traefik.yml:ro
- ./dynamic:/dynamic:ro
- /var/log/traefik:/var/log/traefik
- ./certs:/etc/certs
networks:
- traefik_proxy
# whoami:
# platform: linux/arm64
# image: "traefik/whoami"
# container_name: "simple-service"
# labels:
# traefik.enable: true
# traefik.http.routers.whoami.rule: Host(`whoami.project-conquer.com`)
# traefik.http.routers.whoami.entrypoints: websecure
# traefik.http.routers.whoami.tls.certresolver: le
## "traefik.http.routers.whoami.tls: true"
# networks:
# - traefik_proxy
networks:
traefik_proxy:
external: true