简体   繁体   中英

How Elastic Beanstalk starts Ruby on Rails application? How to debug it?

I'm using Ruby Puma 2.5 instance and I'm quite new to this. I have created new rails app so nothing specific here, just right route to welcome page. When I do eb deploy , rails app is correctly deployed to /var/app/current , but there is no rails process running! If I change user to root (as a test only), change directory to that one and run rails server -p 3000 , the page is available and worked as expected. So how can I debug EB to find why app is not started or how can I start it automatically? I'm curious how EB does that for example where is the script located which runs rails server from correct dir and what is the right way to manipulate with options for example -p 3000 . Many thanks if someone can point to look at correct place and understand this better.

You don't need to log into backend instance(EC2 instance) of Elastic Beanstalk to launch Ruby on Rails server manually. Once you deploy your application, either with Elastic Beanstalk console or AWS CLI or EB CLI, some scripts in the instance will be executed to make deployment process. A script is used to launch Rails server.

Besides eb logs , you can go to the Elastic Beanstalk console and download the deployment logs. The logs are retrieved from backend instances and is a bundled of directory /var/log , that means the content of the bundled logs is the same as logs in the system. You can reference to this document for more detail:

https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.logging.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM