ruby - AWS Code Deploy, Deployment succeeds but start_server script fails -
i attempting run ruby sinatra web server on ec2 instance nohup & command. have got site deploy, , kills server no problem if up, reason when attempts run start_server script on "after install" hook, error:
2017-09-10 23:51:34 [stdout]could not locate gemfile or .bundle/ directory
the bash script trying go 1 directory , run startup command. when login ec2 manually , run script myself inside ec2 server, works charm. reason when code deploy tries run it, deploys successfully, log above gives me error. bash script simple 1 liner:
(cd .. && nohup sudo bundle exec rackup -p80 -o 0.0.0.0 &)
anyone know causing issue makes file run , server starts right when script run manually fail when code deploy tries run same script? deploying github if makes difference. if need see appspec.yml reason, here is:
version: 0.0 os: linux files: - source: /. destination: /var/www/ permissions: - object: /var/www/ mode: 755 hooks: beforeinstall: - location: scripts/stop_server.sh timeout: 300 runas: root - location: scripts/install_dependencies.sh timeout: 300 runas: root afterinstall: - location: scripts/start_server.sh timeout: 300 runas: root
if want take @ github , see if there obvious mistakes, located here: https://github.com/mmoore5325/codedeploysite
thanks.
Comments
Post a Comment