services: homepage: image: nginx container_name: homepage restart: unless-stopped volumes: - ./html:/usr/share/nginx/html # Mount your content directory - ./templates:/etc/nginx/templates # Mount your templates directory expose: - "80" labels: - "traefik.enable=true" - "traefik.http.routers.homepage-secure.entrypoints=https,http" - "traefik.http.routers.homepage-secure.rule=Host(`ghost.tel`)" - "traefik.http.routers.homepage-secure.tls.certresolver=http" - "traefik.http.middlewares.watch-redirect.redirectregex.regex=https?://ghost.tel/watch(.*)" - "traefik.http.middlewares.watch-redirect.redirectregex.replacement=https://invid.ghost.tel/watch$${1}" - "traefik.http.middlewares.watch-redirect.redirectregex.permanent=true" - "traefik.http.routers.homepage-secure.middlewares=watch-redirect" # - "traefik.http.routers.homepage-secure.middlewares=auth@file" environment: - NGINX_HOST=ghost.tel - NGINX_PORT=80 networks: - web networks: web: external: true