2023-05-02 10:22:16 +00:00
|
|
|
# vi: ft=yaml
|
|
|
|
version: "3.7"
|
|
|
|
|
|
|
|
networks:
|
|
|
|
traefik:
|
|
|
|
external: true
|
|
|
|
|
2023-05-03 06:09:16 +00:00
|
|
|
configs:
|
|
|
|
services:
|
|
|
|
file: /srv/traefik/services.yml
|
|
|
|
|
2023-05-02 10:22:16 +00:00
|
|
|
services:
|
|
|
|
traefik:
|
|
|
|
image: traefik:3.0
|
|
|
|
networks:
|
|
|
|
- traefik
|
|
|
|
ports:
|
2023-05-02 12:41:14 +00:00
|
|
|
- 443:443
|
2023-05-02 10:22:16 +00:00
|
|
|
- 80:80
|
2023-05-03 11:26:54 +00:00
|
|
|
- 444:444
|
2023-05-02 10:22:16 +00:00
|
|
|
deploy:
|
|
|
|
placement:
|
|
|
|
constraints: [node.labels.traefik == true]
|
|
|
|
labels:
|
|
|
|
- traefik.enable=true
|
2023-05-03 11:26:54 +00:00
|
|
|
- traefik.http.routers.dashboard.entrypoints=localsecure
|
|
|
|
- traefik.http.routers.dashboard.rule=Host(`traefik.pim.kunis.nl`)
|
2023-05-02 10:22:16 +00:00
|
|
|
- traefik.http.routers.dashboard.service=api@internal
|
|
|
|
- traefik.http.services.dummy-svc.loadbalancer.server.port=8080
|
2023-05-03 11:26:54 +00:00
|
|
|
- traefik.http.routers.dashboard.tls=true
|
|
|
|
- traefik.http.routers.dashboard.tls.certresolver=letsencrypt
|
|
|
|
- traefik.docker.network=traefik
|
2023-05-03 06:09:16 +00:00
|
|
|
|
|
|
|
- traefik.http.routers.esrom.entrypoints=websecure
|
|
|
|
- traefik.http.routers.esrom.service=esrom@file
|
|
|
|
- traefik.http.routers.esrom.rule=Host(`geokunis2.nl`)
|
|
|
|
- traefik.http.routers.esrom.tls=true
|
|
|
|
- traefik.http.routers.esrom.tls.certresolver=letsencrypt
|
2023-05-02 10:22:16 +00:00
|
|
|
volumes:
|
|
|
|
- type: bind
|
|
|
|
source: /var/run/docker.sock
|
|
|
|
target: /var/run/docker.sock
|
2023-05-02 12:54:23 +00:00
|
|
|
- type: bind
|
|
|
|
source: /mnt/data/traefik/acme.json
|
|
|
|
target: /acme.json
|
2023-05-03 06:09:16 +00:00
|
|
|
configs:
|
|
|
|
- source: services
|
|
|
|
target: /etc/traefik/services.yml
|
2023-05-02 10:22:16 +00:00
|
|
|
command:
|
|
|
|
- --providers.docker
|
|
|
|
- --providers.docker.swarmmode
|
|
|
|
- --providers.docker.watch
|
2023-05-03 06:09:16 +00:00
|
|
|
- --providers.docker.exposedbydefault=false
|
|
|
|
|
|
|
|
- --providers.file.filename=/etc/traefik/services.yml
|
|
|
|
|
2023-05-02 10:22:16 +00:00
|
|
|
- --api
|
2023-05-03 12:05:27 +00:00
|
|
|
- --api.insecure=false
|
2023-05-02 10:22:16 +00:00
|
|
|
- --api.dashboard=true
|
2023-05-03 06:09:16 +00:00
|
|
|
|
2023-05-02 10:22:16 +00:00
|
|
|
- --entrypoints.web.address=:80
|
2023-05-02 12:41:14 +00:00
|
|
|
- --entrypoints.web.http.redirections.entrypoint=true
|
|
|
|
- --entrypoints.web.http.redirections.entrypoint.to=websecure
|
|
|
|
- --entrypoints.web.http.redirections.entrypoint.scheme=https
|
|
|
|
- --entrypoints.web.http.redirections.entrypoint.permanent=true
|
2023-05-03 06:09:16 +00:00
|
|
|
|
2023-05-02 12:41:14 +00:00
|
|
|
- --entrypoints.websecure.address=:443
|
2023-05-03 06:09:16 +00:00
|
|
|
|
2023-05-03 11:26:54 +00:00
|
|
|
- --entrypoints.localsecure.address=:444
|
|
|
|
|
2023-05-02 12:41:14 +00:00
|
|
|
- --certificatesresolvers.letsencrypt.acme=true
|
|
|
|
- --certificatesresolvers.letsencrypt.acme.email=pim@kunis.nl
|
|
|
|
- --certificatesresolvers.letsencrypt.acme.httpchallenge=true
|
|
|
|
- --certificatesresolvers.letsencrypt.acme.httpchallenge.entrypoint=web
|