Add maintenance page
What does this MR do?
When doing maintenance we need a nice page!
This works in combination with some nginx configuration to check if a file is in place, then serve up a 503 error with the nice page.
The page is designed to be self contained, so I made it have data uris for the font and logo. Maybe it's overkill, as we still serve up static images...
The nginx configuration that needs to be added would be:
server {
location / {
# this needs adding inside every location block we want to serve the page
# from such as a ~ \.php one...
# the path needs adapting...
if (-f /app/maintenance_mode_on) {
return 503;
}
}
error_page 503 @maintenance;
location @maintenance {
try_files /maintenance.html =404;
}
}
To enter maintenance mode:
touch maintenance_mode_on
to leave maintenance mode:
rm maintenance_mode_on
How confident are you it won't break things if deployed?
Should be ok :)
Links to related issues
Checklist
-
added a test, or explain why one is not needed/possible... -
no unrelated changes -
asked someone for a code review -
joined #foodsharing-beta channel at https://slackin.yunity.org -
added an entry to CHANGELOG.md (description, merge request link, username(s))
Edited by Nick Sellen