feat: add maintenance page with Nginx configuration and update Traefik rules
This commit is contained in:
parent
b09a2bbbd2
commit
d4ffc27aed
2 changed files with 149 additions and 6 deletions
|
|
@ -189,12 +189,8 @@ services:
|
|||
- "traefik.http.routers.info.service=info"
|
||||
- "traefik.http.routers.info.tls.certresolver=letsencrypt"
|
||||
- "traefik.http.services.info.loadbalancer.server.port=3000"
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||
interval: 15s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60s
|
||||
# MAINTENANCE MIDDLEWARE
|
||||
- "traefik.http.routers.info.middlewares=catch-maintenance@docker"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
|
@ -204,6 +200,23 @@ services:
|
|||
condition: service_healthy
|
||||
tiles:
|
||||
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:
|
||||
dokploy-network:
|
||||
|
|
|
|||
130
manutenzione.sh
Normal file
130
manutenzione.sh
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue