Skip to content

Custom build hooks for Elastic Beanstalk for optimizing NPM dependency installation.

License

Notifications You must be signed in to change notification settings

visitdays/ebs-build-hooks

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ebs-build-hooks

Custom build hooks for Elastic Beanstalk for optimizing NPM dependency installation, inspired by this StackOverflow anwer.

Usage

In order to use these build hooks in your application, all you need to do is add the following env.config file in a .ebextensions/ directory in the root of your project:

packages:
  yum:
    git: []
    gcc: []
    make: []
    openssl-devel: []

option_settings:
  - option_name: NODE_ENV
    value: production
  - namespace: aws:elasticbeanstalk:container:nodejs
    option_name: NodeVersion
    value: 4.2.3

files:
  "/opt/elasticbeanstalk/env.vars" :
    mode: "000775"
    owner: root
    group: users
    source: https://raw.githubusercontent.com/jakemmarsh/ebs-build-hooks/master/env.vars
  "/opt/elasticbeanstalk/hooks/configdeploy/pre/40install_node.sh" :
    mode: "000775"
    owner: root
    group: users
    source: https://raw.githubusercontent.com/jakemmarsh/ebs-build-hooks/master/40install_node.sh
  "/opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh" :
    mode: "000775"
    owner: root
    group: users
    source: https://raw.githubusercontent.com/jakemmarsh/ebs-build-hooks/master/50npm.sh
  "/opt/elasticbeanstalk/hooks/configdeploy/pre/50npm.sh" :
    mode: "000666"
    owner: root
    group: users
    content: |
       #no need to run npm install during configdeploy
  "/opt/elasticbeanstalk/hooks/appdeploy/pre/40install_node.sh" :
    mode: "000775"
    owner: root
    group: users
    source: https://raw.githubusercontent.com/jakemmarsh/ebs-build-hooks/master/40install_node.sh

About

Custom build hooks for Elastic Beanstalk for optimizing NPM dependency installation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%