feat: add maintenance page with Nginx configuration and update Traefik rules

This commit is contained in:
Marco Pedone 2026-04-15 17:12:57 +02:00
parent b09a2bbbd2
commit d4ffc27aed
2 changed files with 149 additions and 6 deletions

View file

@ -189,12 +189,8 @@ services:
- "traefik.http.routers.info.service=info" - "traefik.http.routers.info.service=info"
- "traefik.http.routers.info.tls.certresolver=letsencrypt" - "traefik.http.routers.info.tls.certresolver=letsencrypt"
- "traefik.http.services.info.loadbalancer.server.port=3000" - "traefik.http.services.info.loadbalancer.server.port=3000"
healthcheck: # MAINTENANCE MIDDLEWARE
test: ["CMD", "curl", "-f", "http://localhost:3000/"] - "traefik.http.routers.info.middlewares=catch-maintenance@docker"
interval: 15s
timeout: 10s
retries: 3
start_period: 60s
depends_on: depends_on:
backend: backend:
condition: service_healthy condition: service_healthy
@ -204,6 +200,23 @@ services:
condition: service_healthy condition: service_healthy
tiles: tiles:
condition: service_healthy condition: service_healthy
maintenance-page:
image: nginx:alpine
restart: always
networks:
- dokploy-network
volumes:
- ./manutenzione.sh:/manutenzione.sh:ro
entrypoint: ["/bin/sh", "/manutenzione.sh"]
labels:
- "traefik.enable=true"
- "traefik.http.routers.maint.rule=Host(`${DOMAIN}`)"
- "traefik.http.routers.maint.priority=1"
- "traefik.http.routers.maint.entrypoints=websecure"
- "traefik.http.services.maintenance-page.loadbalancer.server.port=80"
- "traefik.http.middlewares.catch-maintenance.errors.status=500-599"
- "traefik.http.middlewares.catch-maintenance.errors.service=maintenance-page"
- "traefik.http.middlewares.catch-maintenance.errors.query=/"
networks: networks:
dokploy-network: dokploy-network:

130
manutenzione.sh Normal file

File diff suppressed because one or more lines are too long