feat(deploy) : add maintenance mode with automatic toggle during deploy
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled

This commit is contained in:
2026-04-02 11:56:13 +02:00
parent 100ab340d4
commit 906c245451
4 changed files with 112 additions and 2 deletions

View File

@@ -2,6 +2,23 @@ server {
listen 80;
server_name sirh.malio-dev.fr;
root /var/www/sirh/public;
# Maintenance mode : si le fichier maintenance.on existe, renvoyer la page 503
if (-f /var/www/sirh/maintenance.on) {
return 503;
}
error_page 503 @maintenance;
location @maintenance {
rewrite ^(.*)$ /maintenance.html break;
}
location = /maintenance.html {
internal;
}
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;