28 lines
624 B
YAML
28 lines
624 B
YAML
version: '3.4'
|
|
services:
|
|
traefik:
|
|
image: 'traefik:2.3'
|
|
container_name: 'traefik'
|
|
restart: 'unless-stopped'
|
|
ports:
|
|
- '80:80'
|
|
- '8080:8080'
|
|
volumes:
|
|
- '/var/run/docker.sock:/var/run/docker.sock:ro'
|
|
- ./traefik/traefik.toml:/traefik.toml
|
|
networks:
|
|
- pi
|
|
|
|
whoami:
|
|
image: 'traefik/whoami'
|
|
restart: 'unless-stopped'
|
|
labels:
|
|
- 'traefik.enable=true'
|
|
- 'traefik.http.routers.whoami.rule=PathPrefix(`/whoami{regex:$$|/.*}`)'
|
|
- 'traefik.http.services.whoami.loadbalancer.server.port=80'
|
|
networks:
|
|
- pi
|
|
|
|
networks:
|
|
pi:
|
|
external: true
|