Can anyone suggest a good good unicorn + nginx + cap deploy how to? I have searched high and low spend like 5 hours getting my deploy up and running with all kind or errors.
I like this one
http://ariejan.net/2011/09/14/lighting-fast-zero-downtime-deployments-with-git-capistrano-nginx-and-unicorn
Also github did a pretty good writeup on nginx and unicorn
https://github.com/blog/517-unicorn
Just yesterday I had to setup some Unicorns and nginx. I followed:
Also, here is my Unicorn config and init.d script: https://gist.github.com/2049606.
The deploy script I ended up using is almost identical to those mentioned in the links above. If you are using RVM, make sure you add something like:
$:.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.
A critical point is that you specify the PID files to be in the correct places (I mistyped that and it took me half an hour to find my mistake). Also make sure your user can write all necessary files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With