daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest May 22nd, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # AWS BeenStalk and Node.JS
  2.  
  3. ## App Location
  4.  
  5. * Initially deployed to : `/tmp/deployment/application`
  6. * Moved afterwords to : `/var/app/current`
  7.  
  8. Logs in `/var/log/eb-activity.log` and `/var/log/nodejs/nodejs.log`
  9.  
  10. ## Access to node and npm binaries
  11.  
  12. `export PATH=$PATH:/opt/elasticbeanstalk/node-install/node-v8.11.1-linux-x64/bin/`
  13.  
  14. ## Install dependencies
  15.  
  16. `/opt/elasticbeanstalk/containerfiles/ebnode.py --app-path /var/app/current  --action npm-install`
  17.  
  18. The `--app-path` argument was not working, following changes on `ebnode.py` to make it work:
  19.  
  20. ```python
  21. def run_npm_install(self, app_path):
  22.         bin_path = self.get_node_bin_path()
  23.         #self.npm_install(bin_path, self.config_manager.get_container_config('app_staging_dir'))
  24.         self.npm_install(bin_path, app_path);
  25. ```
  26.  
  27. ## Change user to nodejs
  28.  
  29. `sudo su - nodejs -s /bin/bash`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top