Skip to content

Instantly share code, notes, and snippets.

@123ish
Created September 26, 2020 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 123ish/6ffe7befa9b289fc6b69695258d99535 to your computer and use it in GitHub Desktop.
Save 123ish/6ffe7befa9b289fc6b69695258d99535 to your computer and use it in GitHub Desktop.
.platform/hooks/prebuild/01_yarn.sh
#!/bin/sh
# need to install node first to be able to install yarn
sudo curl --silent --location https://rpm.nodesource.com/setup_14.x | sudo bash -
sudo yum -y install nodejs
# install yarn
sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
sudo yum -y install yarn
# install
cd /var/app/staging/
# debugging..
ls -lah
yarn install --prod
chown -R webapp:webapp node_modules/ || true # allow to fail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment