49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
|
version: '3.7'
|
||
|
|
||
|
services:
|
||
|
traefik:
|
||
|
image: traefik:latest
|
||
|
container_name: traefik
|
||
|
restart: always
|
||
|
command:
|
||
|
- "--log.level=DEBUG"
|
||
|
- "--api.insecure=true"
|
||
|
- "--metrics.prometheus.addServicesLabels=true"
|
||
|
- "--metrics.prometheus=true"
|
||
|
- "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
|
||
|
- "--entryPoints.web.address=:80"
|
||
|
- "--entryPoints.traefik.address=:8080"
|
||
|
- "--providers.docker=true"
|
||
|
- "--providers.docker.swarmmode=false"
|
||
|
- "--providers.docker.watch"
|
||
|
- "--api=true"
|
||
|
- "--api.insecure=true"
|
||
|
networks:
|
||
|
- traefik
|
||
|
- inbound
|
||
|
volumes:
|
||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||
|
ports:
|
||
|
- target: 80
|
||
|
published: 80
|
||
|
mode: host
|
||
|
- target: 443
|
||
|
published: 443
|
||
|
mode: host
|
||
|
- target: 8080
|
||
|
published: 8090
|
||
|
protocol: tcp
|
||
|
mode: ingress
|
||
|
labels:
|
||
|
- "traefik.http.routers.api.rule=Host(`traefik.docker.localhost`)"
|
||
|
- "traefik.http.routers.api.service=api@internal"
|
||
|
|
||
|
|
||
|
networks:
|
||
|
traefik:
|
||
|
driver: bridge
|
||
|
name: traefik
|
||
|
inbound:
|
||
|
driver: bridge
|
||
|
name: inbound
|