This is required in case dependency versions have changed between the base image, and the current version of Discourse. `yarn install` will only be run when `node_modules` exists, so this change will only affect recent versions of the base image.
cmd:
- su discourse -c 'bundle install --deployment --retry 3 --jobs 4 --verbose --without test development'
+ - exec:
+ cd: $home
+ cmd:
+ - "[ ! -d 'node_modules' ] || su discourse -c 'yarn install --production'"
+
- exec:
cd: $home
cmd: