eb init
eb config save my-env-name --cfg my-config-name # save the environment config
eb terminate # terminate the environment
eb create my-new-env-name --cfg my-config-name # Create a new cloned environment with a new name
Use eb deploy
to package the latest git commited revision to eb.
echo "unsafe-perm=true" > .npmrc
Use eb ssh
to connect to the ebs EC2 instance
- Initially deployed to :
/tmp/deployment/application
- Moved afterwords to :
/var/app/current
Logs in /var/log/eb-activity.log
and /var/log/nodejs/nodejs.log
sudo python /opt/elasticbeanstalk/containerfiles/ebnode.py --action stop-all
sudo python /opt/elasticbeanstalk/containerfiles/ebnode.py --action start-all
export PATH=$PATH:/opt/elasticbeanstalk/node-install/node-v8.11.1-linux-x64/bin/
/opt/elasticbeanstalk/containerfiles/ebnode.py --app-path /var/app/current --action npm-install
The --app-path
argument was not working, following changes on ebnode.py
to make it work:
def run_npm_install(self, app_path):
bin_path = self.get_node_bin_path()
#self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
self.npm_install(bin_path, app_path);
sudo su - nodejs -s /bin/bash
sudo cat /proc/<pid>/environ | tr '\0' '\n'