47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
|
version: "3.3"
|
||
|
|
||
|
services:
|
||
|
|
||
|
traefik:
|
||
|
image: "traefik:v2.2"
|
||
|
restart: always
|
||
|
command:
|
||
|
- "--api.insecure=true"
|
||
|
- "--providers.docker=true"
|
||
|
- "--providers.docker.exposedbydefault=false"
|
||
|
- "--entrypoints.web.address=:80"
|
||
|
ports:
|
||
|
- "80:80"
|
||
|
- "443:443"
|
||
|
networks:
|
||
|
- web
|
||
|
volumes:
|
||
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.http.routers.traefik.rule=Host(`traefik.${DOMAIN}`)"
|
||
|
- "traefik.http.routers.traefik.entrypoints=web"
|
||
|
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
|
||
|
- "docker.group=selfhost"
|
||
|
extra_hosts:
|
||
|
- host.docker.internal:172.17.0.1
|
||
|
|
||
|
|
||
|
whoami:
|
||
|
image: containous/whoami
|
||
|
networks:
|
||
|
- web
|
||
|
labels:
|
||
|
- "traefik.enable=true"
|
||
|
- "traefik.http.routers.whoami.rule=Host(`whoami.${DOMAIN}`)"
|
||
|
- "traefik.http.routers.whoami.entrypoints=web"
|
||
|
- "traefik.http.services.whoami.loadbalancer.server.port=80"
|
||
|
- "docker.group=selfhost"
|
||
|
restart: unless-stopped
|
||
|
|
||
|
|
||
|
networks:
|
||
|
web:
|
||
|
external: true
|
||
|
|