hifis-net / ansible-role-rsd

Ansible role to set up the Research Software Directory.

Home Page:https://galaxy.ansible.com/hifis/rsd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Display "under maintenance" message when updating

cmeessen opened this issue · comments

To avoid data being lost during updates, it would be handy to automatically display a message when we are updating the RSD.

During the last update, I used a replacement nginx template to solve this issue manually:

    location / {
        # Allow quick enabling/disabling of maintenance messages
        if (-f /usr/share/nginx/html/under_maintenance.html) {
            return 503;
        }

        [....]

        error_page 503 /under_maintenance.html;
        location = /under_maintenance.html {
            root /usr/share/nginx/html;
            internal;
        }
    }

As maintenance page I used a simple template:

Edit white-pond-975fre

If the update finished without errors, the maintenance page should disappear again.