From: David Taylor Date: Tue, 3 Jan 2023 17:58:51 +0000 (+0000) Subject: discourse_dev: use local bundler directory for temp install (#662) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e6cb71cd55cfad1c64b0a4b40676cbcaedbc918f;p=discourse_docker.git discourse_dev: use local bundler directory for temp install (#662) discourse_dev installs a temporary version of Discourse to create a pre-migrated database. Previously this was installing gems in the global bundler directory, which could lead to permissions errors. This commit makes it use a local vendor directory, just like we do in the production install of Discourse. --- diff --git a/image/discourse_dev/postgres_dev.template.yml b/image/discourse_dev/postgres_dev.template.yml index 9163805..2092d03 100644 --- a/image/discourse_dev/postgres_dev.template.yml +++ b/image/discourse_dev/postgres_dev.template.yml @@ -43,6 +43,7 @@ run: - exec: cd tmp && git clone https://github.com/discourse/discourse.git --depth=1 - exec: chown -R discourse /tmp/discourse + - exec: cd /tmp/discourse && sudo -u discourse bundle config --local path ./vendor/bundle - exec: cd /tmp/discourse && sudo -u discourse bundle install - exec: cd /tmp/discourse && sudo -u discourse yarn install - exec: cd /tmp/discourse && sudo -u discourse yarn cache clean