diff --git a/.buildpacks b/.buildpacks index 27bed45d8a6..87adff8e0ad 100644 --- a/.buildpacks +++ b/.buildpacks @@ -1,3 +1,2 @@ https://github.com/heroku/heroku-buildpack-nodejs.git#v106 https://github.com/pkgr/heroku-buildpack-ruby.git#v183-1 -https://github.com/istrategylabs/heroku-buildpack-node-cleanup diff --git a/.pkgr.yml b/.pkgr.yml index d3f7b2320d0..4f87bcf11a4 100644 --- a/.pkgr.yml +++ b/.pkgr.yml @@ -19,6 +19,7 @@ targets: build_dependencies: - sqlite3-devel before_precompile: "packaging/setup" +after_precompile: "packaging/teardown" crons: - packaging/cron/openproject-hourly-tasks - packaging/cron/openproject-clear-old-sessions diff --git a/packaging/teardown b/packaging/teardown new file mode 100755 index 00000000000..eefb7cb49b1 --- /dev/null +++ b/packaging/teardown @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -e + +: ${APP_HOME?"Need to set APP_HOME for teardown"} + +echo "Cleaning up NODE installation" +pushd $APP_HOME +rm -rf .heroku/node node_modules frontend/node_modules || true