2021-01-09 20:40:51 +01:00
|
|
|
version: "3.3"
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
|
|
|
traefik:
|
2021-03-27 15:29:10 +01:00
|
|
|
image: traefik:v2.4
|
2021-01-09 20:40:51 +01:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
networks:
|
|
|
|
- web
|
|
|
|
volumes:
|
|
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
2021-05-22 12:33:40 +02:00
|
|
|
- "$PWD/traefik.yml:/etc/traefik/traefik.yml"
|
|
|
|
- "$PWD/extraProviders/:/extraProviders:ro"
|
2021-01-09 20:40:51 +01:00
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2022-03-03 15:36:41 +01:00
|
|
|
- "traefik.http.routers.traefik.rule=Host(`traefik.${HOSTNAME}`)"
|
2021-01-09 20:40:51 +01:00
|
|
|
- "traefik.http.routers.traefik.entrypoints=web"
|
|
|
|
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
|
2021-03-16 22:15:47 +01:00
|
|
|
- "docker.group=proxy"
|
2021-01-09 20:40:51 +01:00
|
|
|
extra_hosts:
|
|
|
|
- host.docker.internal:172.17.0.1
|
|
|
|
|
|
|
|
|
2022-03-06 18:33:13 +01:00
|
|
|
docker-socket-proxy:
|
|
|
|
image: tecnativa/docker-socket-proxy
|
|
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
|
|
environment:
|
|
|
|
# grant privileges as environment variables: https://github.com/Tecnativa/docker-socket-proxy#grant-or-revoke-access-to-certain-api-sections
|
|
|
|
- CONTAINERS=1
|
|
|
|
- INFO=1
|
|
|
|
networks:
|
|
|
|
- dockersocket
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
|
2021-01-09 20:40:51 +01:00
|
|
|
whoami:
|
|
|
|
image: containous/whoami
|
|
|
|
networks:
|
|
|
|
- web
|
|
|
|
labels:
|
|
|
|
- "traefik.enable=true"
|
2022-03-28 20:16:00 +02:00
|
|
|
- "traefik.http.routers.whoami.rule=Host(`whoami.${HOSTNAME}`)"
|
2021-01-09 20:40:51 +01:00
|
|
|
- "traefik.http.routers.whoami.entrypoints=web"
|
|
|
|
- "traefik.http.services.whoami.loadbalancer.server.port=80"
|
2021-03-16 22:15:47 +01:00
|
|
|
- "docker.group=proxy"
|
2021-01-09 20:40:51 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
external: true
|
2022-03-06 18:33:13 +01:00
|
|
|
dockersocket:
|
|
|
|
external: true
|
2021-01-09 20:40:51 +01:00
|
|
|
|