homeserver/proxy/docker-compose.yaml

60 lines
1.5 KiB
YAML
Raw Permalink Normal View History

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:
- "$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"
- "docker.group=proxy"
2021-01-09 20:40:51 +01:00
extra_hosts:
- host.docker.internal:172.17.0.1
depends_on:
- docker-socket-proxy
2021-01-09 20:40:51 +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
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
dockersocket:
external: true
2021-01-09 20:40:51 +01:00