Skip to content

Instantly share code, notes, and snippets.

@technicalbirdVayuz
Last active December 15, 2018 09:41
Show Gist options
  • Save technicalbirdVayuz/bc6510365436d72e5464096a086f6837 to your computer and use it in GitHub Desktop.
Save technicalbirdVayuz/bc6510365436d72e5464096a086f6837 to your computer and use it in GitHub Desktop.
option_settings:
- option_name: PORT
value: 8081
- option_name: ROOT_URL
value: http://elasticbitovn.ap-south-1.elasticbeanstalk.com
- option_name: MONGO_URL
value: mongodb://------:-------@-------.mlab.com:21371/---------------
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: ProxyServer
value: nginx
- namespace: aws:elasticbeanstalk:container:nodejs:staticfiles
option_name: /public
value: /public
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/00_set_tmp_permissions.sh":
mode: "000755"
owner: root
group: root
content: |
#!/usr/bin/env bash
chown -R ec2-user /tmp
chown -R $USER:$(id -gn $USER) /tmp/.config
chown -R nodejs:nodejs /tmp/.npm
packages:
yum:
gcc: []
make: []
openssl-devel: []
libxml2: []
libxml2-devel: []
files:
"/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh" :
mode: "000775"
owner: root
group: root
content: |
#!/bin/bash
function error_exit
{
eventHelper.py --msg "$1" --severity ERROR
exit $2
}
export HOME=/home/ec2-user # ADDED EXPORT COMMAND
echo "export home" # JUST FOR REMARK
OUT=$(/opt/elasticbeanstalk/containerfiles/ebnode.py --action npm- install 2>&1) || 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