【发布时间】:2012-04-01 13:08:09
【问题描述】:
谁能推荐一个好的好的unicorn + nginx + cap deploy 怎么做? 我已经搜索了大约 5 个小时的高低花费,让我的部署启动并运行,出现各种错误或错误。
【问题讨论】:
-
这让我想起了。几天前我打算自己写:)
标签: ruby-on-rails ruby-on-rails-3 deployment nginx unicorn
谁能推荐一个好的好的unicorn + nginx + cap deploy 怎么做? 我已经搜索了大约 5 个小时的高低花费,让我的部署启动并运行,出现各种错误或错误。
【问题讨论】:
标签: ruby-on-rails ruby-on-rails-3 deployment nginx unicorn
这看起来很有希望....
【讨论】:
我想一个很好的答案是 - https://coderwall.com/p/yz8cha。它简短而甜美,对我来说效果很好。
【讨论】:
就在昨天,我不得不设置一些 Unicorns 和 nginx。我关注了:
另外,这是我的 Unicorn 配置和 init.d 脚本:https://gist.github.com/2049606。
我最终使用的部署脚本与上面链接中提到的几乎相同。如果您使用的是 RVM,请确保添加如下内容:
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano" # Load RVM's capistrano plugin.
set :rvm_ruby_string, '1.9.3-p125@YOURGEMSET' # Or whatever env you want it to run in.
关键点是您将 PID 文件指定在正确的位置(我打错了,我花了半个小时才找到我的错误)。还要确保您的用户可以编写所有必要的文件。
【讨论】:
我喜欢这个
github 也写了一篇关于 nginx 和 unicorn 的文章
【讨论】: