Last active
August 24, 2019 22:33
-
-
Save dgitman/d42def493fcfc08fb943dbe9aec597d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
/opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn.sh: | |
content: |- | |
#!/usr/bin/env bash | |
set -xe | |
EB_SCRIPT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k script_dir) | |
EB_APP_STAGING_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_staging_dir) | |
EB_APP_USER=$(/opt/elasticbeanstalk/bin/get-config container -k app_user) | |
EB_SUPPORT_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k support_dir) | |
. $EB_SUPPORT_DIR/envvars | |
. $EB_SCRIPT_DIR/use-app-ruby.sh | |
# Install nodejs | |
echo "install nodejs" | |
curl --silent --location https://rpm.nodesource.com/setup_12.x | sudo bash - | |
yum -y install nodejs | |
echo "install yarn" | |
# install yarn | |
wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo; | |
yum -y install yarn; | |
# yarn install | |
cd $EB_APP_STAGING_DIR | |
yarn | |
# mkdir /home/webapp | |
mkdir -p /home/webapp | |
chown webapp:webapp /home/webapp | |
chmod 700 /home/webapp | |
group: root | |
mode: "000755" | |
owner: root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Second try