#5309 (Live status report during maintenance works)
by Luc Saffre · in Developers
Summary
When a Lino site is down for maintenance works, end users get a "Bad request" page if they happen to try. A better response would be a meaningful and clear page with an estimation of when the site will be back and contact details for asking questions.
The setting Site.readonly has the disadvantage that it requires a restart of the server process and a change of the settings.py file.
Children
Comments
- 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : Also we should maybe change the name from "maintenance.html" to "503.html".
- 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : Jane and froinde are back after the upgrade and the maintenance page works. It is automatically generated by pm buildcache (similar to local.css). TODO: It does not yet show any contact details nor is it translated. I'm not yet sure whether we want it to be in the browser's language, but it might at...
- 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : I pushed my changes in lino and getlino without testing because I'll upgrade now froinde and jane to test it.
- 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : Even easier: no need to create or remove a file, we can tell nginx to automatically return the maintenance page whenever supervisor is down:
# Return maintenance page when error code 502 (i.e. supervisor is down): error_page 502 @maintenance; location @maintenance { root {{projec... - 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : TODO: How to generate the maintenance.html file, including contact details? Note that although the code is the same in every site config, it uses a single file for all sites in /var/www. Or should I rather generate that file for each Lino site?
- 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : First part done: each nginx conf needs a few lines of code in its https server directive. Works on froinde, and will work for all new sites because I updated the getlino/templates/nginx.conf file:
# Enable maintenance mode when file /var/www/maintenance.html exists: root /var/www; if (-f... - 5 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : I found this discussion and tried it, but without success so far. My current work is in a file /etc/nginx/conf.d/01-maintenance.conf on sadu. I also have a file /var/www/maintenance.html but nginx doesn't seem to recognize it.
- 2 years, 10 months ago by Luc Saffre about #5309 (Live status report during maintenance works) : Created new Ticket #5309 (Live maintenance mode).