49 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-08-05 20:59:55 +02:00
---
version: '3.7'
networks:
traefik:
external: true
volumes:
traefik__etc_traefik:
external: true
traefik__letsencrypt:
external: true
services:
traefik:
image: traefik:latest
container_name: traefik
restart: 'unless-stopped'
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- traefik__etc_traefik:/etc/traefik:ro
- traefik__letsencrypt:/letsencrypt
command:
- "--providers.providersthrottleduration=100"
labels:
traefik.enable: true
traefik.http.routers.traefik.rule: Host(`{{ traefik_domain }}`)
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: letsencrypt
traefik.http.routers.dashboard.rule: Host(`{{ traefik_domain }}`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))
2023-03-01 18:29:00 +01:00
{% if traefik_ipwhitelist is defined %}
traefik.http.middlewares.clientips.ipwhitelist.sourcerange: {{ traefik_ipwhitelist }}
2023-03-03 15:41:47 +01:00
traefik.http.routers.traefik.middlewares: "clientips@docker"
2023-03-01 18:29:00 +01:00
{% endif %}
2022-08-05 20:59:55 +02:00
traefik.http.middlewares.auth.basicauth.users: "ludal:$$apr1$$N3vklVTY$$zrq2kwkaVdynGlakyb4J7."
2023-03-01 18:29:00 +01:00
traefik.http.middlewares.auth.basicauth.realm: {{ traefik_domain }} - restricted access
2022-08-05 20:59:55 +02:00
logging:
driver: syslog
options:
tag: docker_traefik
networks:
- traefik