Reputation: 5953
I have a Rails app using a Virtual Ubuntu Server, Apache, Passenger, and Capistrano.
The first time I deployed the app with Capistrano I had set Passenger to select that first release with this code in httpd.conf file:
<VirtualHost *:80>
ServerName ndeavor.ameipro.com
DocumentRoot /opt/bitnami/projects/ndeavor/releases/20130306192753/public
<Directory /opt/bitnami/projects/ndeavor/releases/20130306192753/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
And that started the correct 1st release of my Rails app.
Now, when I Cap Deploy, I would like Capistrano to automatically have Passenger launch the new release.
So, I uncommented these lines in deploy.rb
# If you are using Passenger mod_rails uncomment this:
namespace :deploy do
task :start do ; end
task :stop do ; end
task :restart, :roles => :app, :except => { :no_release => true } do
run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
end
end
The new release was not started. Should I remove the VirtualHost entry from the https.conf file? Is there some step I'm missing?
Thanks!!
Upvotes: 1
Views: 513
Reputation: 3641
When deploying with Capistrano, there is a symlink in your releases directory called current. Your document root should be pointed to the public directory at myapp/releases/current/public
. Then, Capistrano updates the symlink on each deploy to point to the latest release.
Upvotes: 1