elle-o-elle/docker-compose.yml

25 lines
1.1 KiB
YAML

services:
elle-o-elle:
build: .
container_name: elle-o-elle
restart: unless-stopped
networks:
- traefik-public
labels:
- "traefik.enable=true"
- "traefik.http.routers.elle-o-elle.rule=Host(`elle-o-elle.lol`) || Host(`www.elle-o-elle.lol`)"
- "traefik.http.routers.elle-o-elle.entrypoints=websecure"
- "traefik.http.routers.elle-o-elle.tls.certresolver=cloudflare"
- "traefik.http.routers.elle-o-elle.tls.domains[0].main=elle-o-elle.lol"
- "traefik.http.routers.elle-o-elle.tls.domains[0].sans=*.elle-o-elle.lol"
- "traefik.http.services.elle-o-elle.loadbalancer.server.port=80"
# Redirect www to apex
- "traefik.http.middlewares.elle-www-redirect.redirectregex.regex=^https://www\\.elle-o-elle\\.lol/(.*)"
- "traefik.http.middlewares.elle-www-redirect.redirectregex.replacement=https://elle-o-elle.lol/$${1}"
- "traefik.http.middlewares.elle-www-redirect.redirectregex.permanent=true"
- "traefik.http.routers.elle-o-elle.middlewares=elle-www-redirect"
networks:
traefik-public:
external: true