services/traefik/docker-compose.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

version: "3.8"
volumes:
traefik:
name: ${TRAEFIK_VOLUME_NAME:-traefik}
networks:
traefik:
name: ${TRAEFIK_NETWORK_NAME:-traefik}
services:
traefik:
container_name: ${TRAEFIK_CONTAINER_NAME:-traefik}
image: ${TRAEFIK_IMAGE:-traefik:v2.4.9}
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${TRAEFIK_VOLUME_NAME:-traefik}:/traefik
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- target: 80
published: 80
protocol: tcp
mode: host
networks:
- ${TRAEFIK_NETWORK_NAME:-traefik}
command:
- --api.insecure=true
- --log.level=INFO
- --global.sendanonymoususage=false
- --global.checknewversion=false
2021-03-24 22:22:09 +01:00
- --pilot.dashboard=false
2021-02-24 16:36:05 +01:00
- --metrics.prometheus=true
- --providers.docker
- --providers.docker.exposedbydefault=false
- --providers.docker.network=${TRAEFIK_NETWORK_NAME:-traefik}
- --entrypoints.web.address=:80
- --entryPoints.web.forwardedHeaders.insecure
labels:
traefik.enable: 'true'
traefik.http.routers.traefik.rule: 'Host(`${TRAEFIK_DOMAIN:?err}`)'
traefik.http.routers.traefik.entrypoints: 'web'
traefik.http.services.traefik.loadbalancer.server.port: '8080'