【问题标题】:Unicorn doesn't play nice with Capistrano deployment?独角兽不适合 Capistrano 部署?
【发布时间】:2012-05-09 18:41:14
【问题描述】:

在 Capistrano 部署中使用 unicorn 时遇到问题。据我所知,Capistrano 使用了一种方案,每个版本都以唯一的名称部署在版本目录中,如果事务成功,则创建一个名为 current 的符号链接,指向该版本。

所以我最终得到了一个部署目录,例如:

/home/deployer/apps/sample_app/current

然后,当我尝试从 binstubs 目录启动 unicorn 时,所有 unicorn 方法都会在以下路径中查找内容,特别是在 configurator.rb 模块中:

/home/deployer/apps/sample_app

我还不能完全理解独角兽是如何从这里设置工作目录的:

https://github.com/defunkt/unicorn/raw/master/lib/unicorn/configurator.rb

但我想与社区核实一下,由于我的菜鸟本性,我是否遗漏了一些明显的东西。

顺便说一句,我开始独角兽如下

APP_ROOT=/home/deployer/apps/sample_app/current
PID=$APP_ROOT/tmp/pids/unicorn.pid
CMD="$APP_ROOT/bin/unicorn -D -E production -c $APP_ROOT/config/unicorn.rb"

TIA

【问题讨论】:

  • [已解决] 这是通过 unicorn.rb config working_directory 参数设置的

标签: ruby-on-rails capistrano unicorn


【解决方案1】:

这是通过 unicorn.rb config working_directory 参数设置的

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-09
    • 2023-03-20
    • 1970-01-01
    • 2016-10-10
    相关资源
    最近更新 更多