em-shop/traefik/docker-compose.yml

38 lines
1.1 KiB
YAML
Raw Normal View History

2024-11-20 09:53:03 +05:00
services:
traefik:
container_name: traefik
image: traefik:v3.2.0
restart: unless-stopped
command:
- "--providers.docker.network=proxynet"
- "--api.insecure=true"
- "--api.dashboard=true"
- "--providers.docker"
- "--log=true"
- "--log.level=DEBUG"
- "--providers.docker.exposedByDefault=false"
# Entrypoints:
- "--entrypoints.http.address=:80"
- "--entrypoints.postgres.address=:5432"
- "--entrypoints.rabbitmq-gui.address=:15672"
labels:
- "traefik.enable=true"
- "traefik.http.routers.dashboard.rule=PathPrefix(`/api`) || PathPrefix(`/dashboard`)"
- "traefik.http.routers.dashboard.service=api@internal"
- "traefik.http.routers.dashboard.middlewares=auth"
- "traefik.http.middlewares.auth.basicauth.usersfile=/httpauth/usersfile.htpasswd"
ports:
- "80:80"
- "5432:5432"
- "15672:15672"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./httpauth:/httpauth
logging:
driver: "json-file"
options:
max-size: "1m"
networks:
default:
name: proxynet
external: true