简体   繁体   中英

Unicorn doesn't play nice with Capistrano deployment?

I am having issues when using unicorn with a Capistrano deployment. 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.

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:

/home/deployer/apps/sample_app

I haven't been able to fully understand how unicorn sets the working_directory from here:

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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