added simply middleware

This commit is contained in:
Dejan R. 2025-12-01 09:26:12 +00:00
parent 3e6cff7107
commit 4addb15804

View file

@ -27,32 +27,19 @@ services:
networks:
- traefik
labels:
#- "traefik.enable=true"
# Router
#- "traefik.http.routers.gotify.rule=Host(`gotify.rozic-dev.com`)"
#- "traefik.http.routers.gotify.entrypoints=websecure"
# - "traefik.http.routers.gotify.tls.certresolver=letsencrypt"
# Optional redirect from HTTP → HTTPS
# - "traefik.http.routers.gotify-http.rule=Host(`gotify.rozic-dev.com`)"
# - "traefik.http.routers.gotify-http.entrypoints=web"
# - "traefik.http.routers.gotify-http.middlewares=redirect-to-https"
# - "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# # Service
# - "traefik.http.services.gotify.loadbalancer.server.port=80"
# labels:
- "traefik.enable=true"
# Router
- "traefik.http.routers.gotify.rule=Host(`gotify.rozic-dev.com`)"
- "traefik.http.routers.gotify.entrypoints=websecure"
- "traefik.http.routers.gotify.tls.certresolver=letsencrypt"
# Optional redirect from HTTP → HTTPS
- "traefik.docker.network=traefik_default"
# HTTP router (plain HTTP, used for ACME + redirect)
- "traefik.http.routers.gotify-http.rule=Host(`gotify.rozic-dev.com`)"
- "traefik.http.routers.gotify-http.entrypoints=web"
- "traefik.http.routers.gotify-http.middlewares=redirect-to-https"
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# Service
# HTTPS router (real app traffic)
- "traefik.http.routers.gotify.rule=Host(`gotify.rozic-dev.com`)"
- "traefik.http.routers.gotify.entrypoints=websecure"
- "traefik.http.routers.gotify.tls=true"
- "traefik.http.routers.gotify.tls.certresolver=letsencrypt"
# Service (internal port inside the Gotify container)
- "traefik.http.services.gotify.loadbalancer.server.port=80"