awesome-compose/traefik-golang/docker-compose.yml
Huaxin Zhang eb693b89d4 Update treafix image to official version v2.4, as 2.2 is not work
Signed-off-by: Huaxin Zhang <zhx_zhx12@163.com>
2021-05-12 22:19:53 +08:00

20 lines
549 B
YAML

version: "3.7"
services:
frontend:
image: traefik:v2.4
command: --providers.docker --entrypoints.web.address=:80 --providers.docker.exposedbydefault=false
ports:
# The HTTP port
- "80:80"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- backend
backend:
build: backend
labels:
- "traefik.enable=true"
- "traefik.http.routers.go.rule=Path(`/`)"
- "traefik.http.services.go.loadbalancer.server.port=80"