The site maintenance with “./launcher rebuild app” takes some time to fully rebuild the site (installing new plugins etc from git).
Is there any recommended way to show a static page saying “Under maintenance” while I rebuild the discourse?
What I thought was to use nginx. That involves stopping the docker to serve on port 80 and letting nginx reverse proxy to takeover and redirect traffic to either docker container or to my static page.
I’m thinking of doing that with manually editing the nginx.conf to the following whenever needed,
The way I think is better and easier is to use a two container setup so you can build a new container while the old one runs. There is much less down time that way. Others think that running an extra web server is easier.
Major database upgrades happen less than once a year. Minor database upgrades don’t take very long and you can rebuild the data container, destroy and start the web container in a very few minutes. It seems that some people would rather have a pretty message saying that the site is down rather than reducing down time, so a second container is the way to do it.
Actually, maybe the easiest solution would be to just have a second nginx container with a “back soon” message that you ran by hand while doing an upgrade, like
./launcher stop app
docker run nginx --name back-soon # and some more stuff to see that a page was served
./launcher bootstrap app
./launcher destroy app
docker stop back-soon
./launcher start app
But then you have to get a cert and keep the cert updated for the back-soon container, which is complicated.