26 lines
701 B
YAML
26 lines
701 B
YAML
---
|
|
version: "3.7"
|
|
|
|
services:
|
|
traefik:
|
|
container_name: traefik
|
|
command:
|
|
- "--api=true"
|
|
- "--api.insecure=true"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--entrypoints.web.address=:80"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
|
|
- "traefik.http.routers.traefik.entrypoints=web"
|
|
- "traefik.http.routers.traefik.service=api@internal"
|
|
|
|
whoami:
|
|
image: containous/whoami
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
|