nextstrain / nextstrain.org

The Nextstrain website
https://nextstrain.org
GNU Affero General Public License v3.0
87 stars 49 forks source link

scripts/heroku-build: Set HOME=/tmp for build #907

Closed tsibley closed 3 weeks ago

tsibley commented 3 weeks ago

Some things (Puppeteer during npm install, in some cases; next build when SWC deps are missing) want to store files in $HOME/.cache/ and that doesn't work due to permissions when HOME=/ (the fallback value provided by bash because it can't lookup a user for the uid we use).

I believe these caches are needed at build-time only and can be safely discarded afterwards. If that turns out to not be the case, then we can switch to setting HOME=/build/app instead to include them in the slug.

Resolves: https://github.com/nextstrain/nextstrain.org/issues/895

Checklist

jameshadfield commented 2 weeks ago

Following up - the dependabot-triggered PR from this morning successfully built & deployed 🎉