5GB should be enough headroom for the update, at least for a while. I would suggest warn and exit if less than that is fine, but I think it might make sense to get the size of the last backup, and if (after the update) there won’t be enough space for the next backup, then at least warn, or better yet give them the choice.
That way they are aware that they have to do something about space before it becomes a show stopper. At the moment some of the support questions are urgent because the forum stops working. Warning the admin that they’re about to ring the bell may make them be a bit more proactive.
That would be fine. We’re talking about the difference between Discourse warning you that your instance might stop working soon, and it just informing you that it has already stopped working (in the CLI) or failing to update via the GUI.
Warnings are less stressful than a broken installation (for the admin) and if they include a link to some basic triage then admins who don’t ignore the warnings may be able to resolve the issue themselves, rather than posting here on meta with “My instance is broken, what do I do?”
Some rough idea of the RAM footprint (over time) of the instance would be great, down at the bottom of /admin where it shows space. The way I see it there are a lot of support topics which resolve down to RAM and disk space problems - warnings might reduce how often people need support.
root@test:/var/discourse# ./launcher rebuild app
You have less than 5GB of free space on the disk. You will need more space to continue
Would you like to attempt to recover space by cleaning docker images and containers in the system?(y/N)y
WARNING! This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all dangling images
Are you sure you want to continue? [y/N] y
Total reclaimed space: 2.651 GB
If the cleanup was successful, you may try again now
This is done using the new Docker clean, and will work even if you have 0 bytes available. We also try to detect the correct folder for space.
If this brings any problem for you please open a #bug topic, and remember you can always skip this with --skip-prereqs.