简体   繁体   English

独角兽在Capistrano部署中表现不佳吗?

[英]Unicorn doesn't play nice with Capistrano deployment?

I am having issues when using unicorn with a Capistrano deployment. 在Capistrano部署中使用独角兽时遇到问题。 From what I have been able to understand Capistrano uses a scheme in wich every release is deployed inside the releases directory under a unique name and if the transaction was successful, creates a symlink named current that will point to that release. 据我了解,Capistrano使用一种方案,每个发行版都以唯一的名称部署在发行目录内,如果交易成功,则会创建一个名为current的符号链接,该符号链接将指向该发行版。

So I end up with a deployment directory such as: 因此,我最终得到一个部署目录,例如:

/home/deployer/apps/sample_app/current

Then when I try to start unicorn from the binstubs directory all the unicorn methods look for things in the following path, particularly in the configurator.rb module: 然后,当我尝试从binstubs目录启动unicorn时,所有unicorn方法都会在以下路径中查找内容,尤其是在configurator.rb模块中:

/home/deployer/apps/sample_app

I haven't been able to fully understand how unicorn sets the working_directory from here: 我还不能完全理解独角兽如何从此处设置working_directory:

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

But I wanted to check with the community if I am missing something evident due to the noob nature in me. 但是我想向社区询问是否由于我的菜鸟本性而缺少明显的东西。

BTW I am starting unicorn as follows 顺便说一句,我开始独角兽如下

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 TIA

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

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

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