homeserver/proxy/docker-compose.yaml

62 lines
1.5 KiB
YAML
Raw Normal View History

2021-01-09 19:40:51 +00:00
version: "3.3"
services:
traefik:
image: traefik:v2.4
2021-01-09 19:40:51 +00:00
restart: always
ports:
- "80:80"
- "443:443"
networks:
- web
2022-09-12 19:42:37 +00:00
- dockersocket
2021-01-09 19:40:51 +00:00
volumes:
- "$PWD/traefik.yml:/etc/traefik/traefik.yml"
- "$PWD/extraProviders/:/extraProviders:ro"
2021-01-09 19:40:51 +00:00
labels:
- "traefik.enable=true"
2022-03-03 14:36:41 +00:00
- "traefik.http.routers.traefik.rule=Host(`traefik.${HOSTNAME}`)"
2021-01-09 19:40:51 +00:00
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
- "docker.group=proxy"
2021-01-09 19:40:51 +00:00
extra_hosts:
- host.docker.internal:172.17.0.1
depends_on:
- docker-socket-proxy
2021-01-09 19:40:51 +00: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 19:40:51 +00:00
whoami:
image: containous/whoami
networks:
- web
labels:
- "traefik.enable=true"
2022-03-28 18:16:00 +00:00
- "traefik.http.routers.whoami.rule=Host(`whoami.${HOSTNAME}`)"
2021-01-09 19:40:51 +00:00
- "traefik.http.routers.whoami.entrypoints=web"
- "traefik.http.services.whoami.loadbalancer.server.port=80"
- "docker.group=proxy"
2021-01-09 19:40:51 +00:00
restart: unless-stopped
networks:
web:
external: true
dockersocket:
external: true
2021-01-09 19:40:51 +00:00