Guest User

Untitled

a guest
May 22nd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  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`
Add Comment
Please, Sign In to add comment