2021-01-09 20:40:51 +01:00
|
|
|
services:
|
|
|
|
|
|
|
|
traefik:
|
2023-01-12 10:03:26 +01:00
|
|
|
image: traefik:${TRAEFIK_VERSION}
|
2021-01-09 20:40:51 +01:00
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
networks:
|
|
|
|
- web
|
2022-09-12 21:42:37 +02:00
|
|
|
- dockersocket
|
2021-01-09 20:40:51 +01:00
|
|
|
volumes:
|
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:
|
2024-10-08 13:18:15 +02:00
|
|
|
- host.docker.internal:host-gateway
|
2022-10-01 23:27:19 +02:00
|
|
|
depends_on:
|
|
|
|
- docker-socket-proxy
|
2021-01-09 20:40:51 +01:00
|
|
|
|
|
|
|
|
2022-03-06 18:33:13 +01:00
|
|
|
docker-socket-proxy:
|
|
|
|
image: tecnativa/docker-socket-proxy
|
|
|
|
restart: unless-stopped
|
2024-10-08 13:18:15 +02:00
|
|
|
volumes:
|
2022-03-06 18:33:13 +01:00
|
|
|
- /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
|
2024-10-08 13:18:15 +02:00
|
|
|
- INFO=1
|
2022-03-06 18:33:13 +01:00
|
|
|
networks:
|
|
|
|
- dockersocket
|
|
|
|
privileged: true
|
|
|
|
|
|
|
|
|
2024-02-09 13:51:46 +01:00
|
|
|
# whoami:
|
|
|
|
# image: containous/whoami
|
|
|
|
# networks:
|
|
|
|
# - web
|
|
|
|
# labels:
|
|
|
|
# - "traefik.enable=true"
|
|
|
|
# - "traefik.http.routers.whoami.rule=Host(`whoami.${HOSTNAME}`)"
|
|
|
|
# - "traefik.http.routers.whoami.entrypoints=web"
|
|
|
|
# - "traefik.http.services.whoami.loadbalancer.server.port=80"
|
|
|
|
# - "docker.group=proxy"
|
|
|
|
# restart: unless-stopped
|
2021-01-09 20:40:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
web:
|
|
|
|
external: true
|
2022-03-06 18:33:13 +01:00
|
|
|
dockersocket:
|
|
|
|
external: true
|
2021-01-09 20:40:51 +01:00
|
|
|
|