加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 运营中心 > Nginx > 正文

ruby-on-rails-4 – 使用AWS Elastic Beanstalk运行Puma和Nginx

发布时间:2020-12-13 21:36:12 所属栏目:Nginx 来源:网络整理
导读:我已经能够成功地使用Passenger在Beanstalk上运行我的应用程序,但是我对Puma没有运气.每当我部署到Puma堆栈时,我得到502错误,我的日志文件表明它找不到puma sock文件: 2014/05/15 21:00:15 [暴击] 1684#0:* 4连接()到unix:///var/run/puma/my_app.sock失

我已经能够成功地使用Passenger在Beanstalk上运行我的应用程序,但是我对Puma没有运气.每当我部署到Puma堆栈时,我得到502错误,我的日志文件表明它找不到puma sock文件:

2014/05/15 21:00:15 [暴击] 1684#0:* 4连接()到unix:///var/run/puma/my_app.sock失败(2:没有这样的文件或目录)连接到upstream,client:10.184.156.117,server:_,request:“GET / HTTP / 1.1”,上游:“http:// unix:///var/run/puma/my_app.sock:/”,host:“ app-env-89spnxpcai.elasticbeanstalk.com”

我的应用程序是使用Ruby ruby?? 2.0.0p451& Rails 4.1.1

我的.ebextensions配置看起来像这样

packages:
  yum:
    git: []

commands:
  add_bundle_exec:
    test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
    cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
    command: perl -pi -e 's/(rake)/bundle exec $1/' 11_asset_compilation.sh 12_db_migration.sh
  add_deployment_flag:
    test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
    cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
    command: perl -pi -e 's/(bundle install)/$1 --deployment/' 10_bundle_install.sh
  make_vendor_bundle_dir:
    test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
    command: mkdir /var/app/support/vendor_bundle
  set_vendor_bundle_var:
    test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
    cwd: /opt/elasticbeanstalk/support
    command: sed -i '12iexport EB_CONFIG_APP_VENDOR_BUNDLE=$EB_CONFIG_APP_SUPPORT/vendor_bundle' envvars
  symlink_vendor_bundle:
    test: test ! -f /opt/elasticbeanstalk/support/.post-provisioning-complete
    cwd: /opt/elasticbeanstalk/hooks/appdeploy/pre
    command: sed -i 's/(^cd $EB_CONFIG_APP_ONDECK)/1nln -s $EB_CONFIG_APP_VENDOR_BUNDLE ./vendor/bundle/' 10_bundle_install.sh
  z_write_post_provisioning_complete_file:
    cwd: /opt/elasticbeanstalk/support
    command: touch .post-provisioning-complete 

我做错了什么,我需要一些特别的东西让它与Puma一起工作吗?

最佳答案
这个问题不适用于最新版本 – 运行Ruby 2.0(Puma)的64位Amazon Linux 2014.03 v1.0.5

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读