Maintenance page workaround - can this be done?

Yeah, I would do it in stages:

  1. get a slightly more powerful server
  2. get the two container installation working

if at this point you are satisfied, stop here, or:

  1. implement the maintenance page using @Lilly’s excellent guide above. :+1:

haha i am glad you asked because i did not take the time to explain this part (i should have - there is a lot to explain and Cloudflare is complex!)

when the workers route page is set, every single image load and page view on the forum is routing through that worker.

the Cloudflare free CDN plan includes free 100,000 requests/day limit on a worker route.

thus, if you have a relatively busy forum, in order to prevent hitting your free tier cap in a day it is a good idea not to have it on all the time.

so this is just the worker route, not the maintenance page - you can leave the maintenance page up the whole time - it does not get hit unless you have the worker route on it. this is just that Step 2 part where you assigned the route (which is easy to setup and delete). unless you are using a cloudflare paid plan, it is thus good practice to only have it on when you are doing your own maintenance.

  1. go to the Cloudflare workers route page for your domain and click the button on the right side of the route.

  1. at the bottom of the edit screen, click the remove button to detach the worker page from the route.

  1. don’t worry, the worker code itself won’t be deleted, just the routing rule. then next time you do your rebuilt / update, you can just add it again like in Step 2 above.

if you are on a paid Cloudflare plan then you have nothing to worry about. However, then you can use the Cloudflare error pages instead of a workers page… (did i mention that Cloudflare is pretty complex? LOL)

my general steps are:

  1. add the workers route on Cloudflare
  2. ssh into hetzner
  3. do any system updates (eg: sudo apt update && sudo apt upgrade -y), then reboot the server if necessary (i use shutdown -r now to do a full shut down and restart)
  4. ssh in again if i needed to restart my server
  5. run ./update-web.sh
  6. once the shell script is complete and my forum loads again, i remove the workers route on Cloudflare

I do not know coding and dev-world at all more than I did one hello world thing with Visual Basic long long time ago. But I can do some things, because I know better how to admin my WordPress and Mastodon/Pixelfed servers, and somehow my Discourse. Plus out there is thingy named AI (that isn’t such easy for a novice than is advertized).

I don’t know if this is even remotely possible with Discourse because of Docker, but in ordinary Nginx-Varnish-WordPress world I build a system where a plesk server gets information of 50x error and shows an error page. Actually I have three setups, where frontend nginx shows generated snapshot content if Varnish is down, Varnish starts use snapshot for uncached content when WordPress-related backend is down and third one is error page if frontend nginx doesn’t answer.

Varnish things aren’t possible for Discourse, but I can’t see any reasons why one couldn’t build such spiderweb into Docker-world too where any 50x error would show an errorpage.

That could be very error prone system though. And I have no idea what so ever what would happend if there is more than handful users.

There is the most obvious answer too, of course: has i.e. Nginx before Discourse. I used that before I moved on to 2-container.