Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Forked from Nainterceptor/00-node6.config
Created March 6, 2018 06:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save pbojinov/184511cefe933d155b4748df8d6e5fb9 to your computer and use it in GitHub Desktop.
Save pbojinov/184511cefe933d155b4748df8d6e5fb9 to your computer and use it in GitHub Desktop.
Quick & dirty hack to get NodeJS 6 on AWS Elastic BeanStalk
option_settings:
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeCommand
value: "npm start"
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: NodeVersion
value: "4.4.3"
commands:
050-node-script-installer:
command: "curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash -"
test: "[ ! -x /usr/bin/node ]"
075-install_nodeJS:
command: "yum -y install nodejs gcc-c++ make"
test: "[ ! -x /usr/bin/node ]"
100-replace-node:
command: "mv node node.old && ln -s /usr/bin/node node"
cwd: "/opt/elasticbeanstalk/node-install/node-v4.4.3-linux-x64/bin"
test: "[ ! -x /opt/elasticbeanstalk/node-install/node-v4.4.3-linux-x64/bin/node.old ]"
100-replace-npm:
command: "mv npm npm.old && ln -s /usr/bin/npm npm"
cwd: "/opt/elasticbeanstalk/node-install/node-v4.4.3-linux-x64/bin"
test: "[ ! -x /opt/elasticbeanstalk/node-install/node-v4.4.3-linux-x64/bin/npm.old ]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment