DTI is down for maintenance!
++ We're working on something for the moment, sorry for the + trouble! +
+We're doing our best to be back up soon! 💖
+diff --git a/deploy/files/sites-available/impress.conf b/deploy/files/sites-available/impress.conf index c889818a..1085bf66 100644 --- a/deploy/files/sites-available/impress.conf +++ b/deploy/files/sites-available/impress.conf @@ -8,6 +8,8 @@ server { } server { + set $maintenance 0; # To enable maintenance mode, set this to 1. + server_name {{ impress_hostname }}; listen 443 ssl; listen [::]:443 ssl; @@ -31,10 +33,19 @@ server { add_header ETag ""; } + # On status 503, return the maintenance page. + error_page 503 maintenance.html; + # Try serving static files first. If not found, fall back to the app. try_files $uri/index.html $uri @app; location @app { + # If we're hardcoded as being in maintenance mode, return status 503, which + # will show the maintenance page as specified above. + if ($maintenance = 1) { + return 503; + } + proxy_pass http://127.0.0.1:3000; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/public/maintenance.html b/public/maintenance.html new file mode 100644 index 00000000..e656a9d2 --- /dev/null +++ b/public/maintenance.html @@ -0,0 +1,56 @@ + + +
+ + ++ We're working on something for the moment, sorry for the + trouble! +
+We're doing our best to be back up soon! 💖
+