简体   繁体   English

Elastic Beanstalk如何启动Ruby on Rails应用程序? 如何调试呢?

[英]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. 我正在使用Ruby Puma 2.5实例,对此我还很陌生。 I have created new rails app so nothing specific here, just right route to welcome page. 我已经创建了新的Rails应用程序,因此这里没有具体内容,只是通往欢迎页面的正确方法。 When I do eb deploy , rails app is correctly deployed to /var/app/current , but there is no rails process running! 当我执行eb deploy ,rails应用程序已正确部署到/var/app/current ,但是没有正在运行的rails进程! 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. 如果我将用户更改为root (仅作为测试),则将目录更改为该目录,然后运行rails server -p 3000 ,该页面可用并按预期工作。 So how can I debug EB to find why app is not started or how can I start it automatically? 那么,如何调试EB来查找为什么未启动应用程序或如何自动启动它? 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 . 我很好奇EB如何做到这一点,例如,脚本位于哪里,该脚本从正确的目录运行rails server ,以及使用-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. 您无需登录到Elastic Beanstalk的后端实例(EC2实例)即可手动启动Ruby on Rails服务器。 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. 使用Elastic Beanstalk控制台或AWS CLI或EB CLI部署应用程序后,将执行实例中的一些脚本以进行部署过程。 A script is used to launch Rails server. 脚本用于启动Rails服务器。

Besides eb logs , you can go to the Elastic Beanstalk console and download the deployment logs. 除了eb logs ,您还可以转到Elastic Beanstalk控制台并下载部署日志。 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. 日志是从后端实例检索的,并且是目录/var/log的捆绑包,这意味着捆绑的日志内容与系统中的日志相同。 You can reference to this document for more detail: 您可以参考此文档以获取更多详细信息:

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用具有弹性beanstalk的amazon Web服务将秘密文件推送到EC2 Ruby on Rails应用程序? - How should secret files be pushed to an EC2 Ruby on Rails application using amazon web services with their elastic beanstalk? 如何在Elastic Beanstalk上部署新版本的Ruby on Rails应用程序而不重置数据库? - How to deploy new version of Ruby on Rails app on Elastic Beanstalk without resetting database? Elastic Beanstalk没有为Ruby on Rails加载资源 - Elastic Beanstalk not loading assets for Ruby on Rails 如何在单个容器Docker环境中的Amazon Elastic Beanstalk上部署Rails应用程序 - How to deploy Rails application on Amazon Elastic Beanstalk on a single container Docker environment 如何为 ruby 2.7.1 解决 AWS Elastic Beanstalk 上的 Rail 6 部署错误 - How to resolve Rail 6 deploy error on AWS Elastic Beanstalk for ruby 2.7.1 如何在弹性豆秆中应用ruby版本的补丁 - How to apply a ruby version patch in elastic-beanstalk 将Rails应用程序部署到Elastic Beanstalk时遇到许多问题 - Many problems with deploying a rails application to Elastic Beanstalk 我想在弹性beanstalk中看到rails应用程序,但我可能会对ruby版本感到愤怒 - I would like to see the rails application in elastic beanstalk, but I can be angry at the ruby ​version 在AWS Elastic Beanstalk上部署rails应用程序 - Deploying rails application on AWS Elastic Beanstalk 如何调试Rails应用程序? - How to debug Rails application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM