Been running Discourse for years, and my experience has been uniformly awesome except for one recurring problem:
Whenever I see “You are running an old version of the Discourse image” on the update screen, I am overtaken by a grim pallor and an overwhelming sense of dread.
Why?
Because I know I’ll be wrestling my DigitalOcean droplet from the command line—something I generally hate—for a few hours before I can get the upgrade to go through properly.
And this time, I can’t seem to get it working at all
As far as I can tell, my free space is being eaten up by the /dev/vda1 directory. But when I investigate this directory, I am getting different feedback depending on the method!
The image below illustrates this oddity. Notice how, in the top portion (which comes from a df -h command), the /dev/vda1 folder appears to have 7.1GB free.
But then notice how the launcher says there is only 4GB free in that same folder!
Specifically, I am looking for advice on why 2 different methods of observing the file return 2 different amounts of free space.
And then I would love to know how to take advantage of the open 7.1GB so I can perform the upgrade.
(For clarification, I am not looking for a lazy response like, “Just upgrade your DO droplet”—if I wanted to double my yearly expenses on this forum, I would have done that already.)
For this particular rebuild you needed to download a new base image, shown from the WARNING to Status lines in your screenshot. This is large, 2.81GB according to my system, so what you’re seeing is the space lost to that new version of the base image.
# docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
discourse/base latest ab71a5d97460 4 days ago 2.81GB
Using ./launcher cleanup will clear unused containers and images which may reclaim enough space and as @pfaffman said, pruning with docker directly may be able to clear further unused objects, though I personally haven’t seen any significant benefit beyond the containers and images.
Another thing that may help is to clear the apt cache which can become quite large.
I’ve tried every pruning/removal/cleanup/doctor command I could find, but the bottom line appears to be that this is not going to work unless there are 7.811GB free on a given machine.
If this is the case, I don’t see how a 25GB DO droplet can still be recommended as a starting condition
Also, here’s an example of the process that is leading me to the above conclusion:
Beginning:
6.9GB free, 72% used
After running ./launcher rebuild app:
3.7GB free, 85% used
I don’t see any other way out of this, but I hope someone else does!
You have 7.1GB free before downloading the discourse container image but less than 5gb after downloading it when we perform the check.
You have two options:
Run ./launcher rebuild app --skip-prereqs to bypass the disk space check
Increase your disk size
If you pick 1 you kick the can down the road, but you will eventually have to deal with disk usage as both your community and Discourse grow over time.