infrastructure/compose/05_caddy/docker-compose.yml
Tobias Manske 59fa4a73f2
Reimplement redirect domains
Signed-off-by: Tobias Manske <tobias.manske@mailbox.org>
2022-06-20 14:36:34 +02:00

22 lines
597 B
YAML

---
version: "3.4"
services:
redirect:
image: caddy:2
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro,z
labels:
- "traefik.enable=true"
- "traefik.http.routers.caddyredir.rule={{ redirect.hosts | map(attribute='from') | map('regex_replace', '^(.*)$', 'Host(`\\1`)') | join(' || ') }}"
- "traefik.http.routers.caddyredir.entryPoints=websecure"
- "traefik.http.services.caddyredir.loadbalancer.server.port=80"
- "com.centurylinklabs.watchtower.scope=update"
restart: always
networks:
- gateway
networks:
gateway:
external: true