-
-
Save markudevelop/75b19bd343dbf9b4a1b50083cf9bad40 to your computer and use it in GitHub Desktop.
`npm install`s a Meteor application bundle during AWS Elastic Beanstalk deployment.
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/55npm_install.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
# Custom npm install to work with Meteor/s build command | |
export USER=root | |
export HOME=/tmp | |
export NODE_PATH=`ls -td /opt/elasticbeanstalk/node-install/node-* | head -1`/bin | |
echo "------------------------------ — Installing NPM modules for Meteor — -----------------------------------" | |
OUT=$([ -d "/tmp/deployment/application" ] && cd /tmp/deployment/application/programs/server && $NODE_PATH/npm install --production) || error_exit "Failed to run npm install. $OUT" $? | |
echo $OUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment