How to check the plugin was downloaded?

I’m trying to install the Discourse Math Plugin. It is the 1st plugin I install. Discourse runs on a very modest VM under GCP.

I edited the app.yml file like this:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-math.git

After running ./launcher rebuild app I got the message down below from my VM, complaining about memory, and my plugin still does not show in my discourse settings so it does not seem to have installed it. Does the message below mean that, because of the lack of memory, nothing could actually happen? I am surprised that 5 GB is not enough to download the plugin. Anyway to check if the download happened? Or is that just my app.yml that I didn’t edit properly?

root@discourse-gcp1:/var/discourse# ./launcher rebuild app
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20200512-1735: Pulling from discourse/base
Digest: sha256:7f6c5be23a8e4237cecafaca9d041de5964f8237345b7b183cebdee1f73ed024
Status: Downloaded newer image for discourse/base:2.0.20200512-1735
docker.io/discourse/base:2.0.20200512-1735
You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to cont
inue
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       9.6G  5.3G  4.4G  55% /
Would you like to attempt to recover space by cleaning docker images and containers in the system?(y/N)y
If the cleanup was successful, you may try again now
root@discourse-gcp1:/var/discourse#
1 Like

That is not memory, but disk space.

Our launcher script checks for disk space and blocks a rebuild if there is less than 5GB free of disk space in the server. You will want at least a 20GB disk for a machine hosting Discourse.

Regarding the title, since the rebuild was blocked, the app was not rebuilt and the plugins wasn’t installed.

3 Likes

Ok, that was an oversight on my end then. I didn’t see any specific disk space require requirement on the install page so I didn’t pay attention when setting up my VM.

Also, in the app.yml. I see the command cd: $home/plugins, yet the directory does not exist. Will that command block create it or should I create that directory beforehand?

1 Like

on a side note, GCP issued also a warning on memory (RAM) in my GCP dashboard. The VM was initially setup with 3.75 GB which is above the Discourse requirement. Any recommendation for memory?

1 Like

It does exists: discourse/plugins at master · discourse/discourse · GitHub

The command is run inside a container, so $home means the image $home.

Oh that may be because even the cheapest Digital Ocean VPS has 25GB.

Maybe send a PR to the docs adding the recommended minimum disk space for a server?

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.