Ok, fixed as per Stuck on yarn install, Time out.
For reference, in /var/discourse/templates/web.template.yml
I added this block:
- exec:
cd: $home
cmd:
- su discourse -c 'yarn config set network-timeout 600000 -g'
before this one is called:
- exec:
cd: $home
hook: yarn
cmd:
- |-
if [ "$version" != "tests-passed" ]; then
rm -rf app/assets/javascripts/node_modules
fi
- su discourse -c 'yarn install --frozen-lockfile && yarn cache clean'
But why does it time-out? The solution on the linked topic states that it’s because of the small server specs (Google e2.micro instance, 2 cores, 1 GB RAM). But this is a 4 cores, 6GB VPS.