FIX: `yarn install` in web.template.yml (#565)
authorDavid Taylor <david@taylorhq.com>
Thu, 26 Aug 2021 18:15:13 +0000 (19:15 +0100)
committerGitHub <noreply@github.com>
Thu, 26 Aug 2021 18:15:13 +0000 (19:15 +0100)
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.

templates/web.template.yml

index 04d16524224e4a86269921de439d344b33f1ded7..31d952432cd33b3626dcce85c17ae04532b07553 100644 (file)
@@ -154,6 +154,11 @@ run:
       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: