July 26, 2008
Posted by roadburn
Deploying Rails with Capistrano
http://blog.codahale.com/2006/06/19/time-for-a-grown-up-server-rails-mongrel-apache-capistrano-and-you/
1 2 3 4 5 | $ sudo gem install capistrano $ capify . $ cap deploy:setup $ cap deploy:cold $ cap deploy:migrations |
Can’t remember where I got this from…
deploy.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | set :runner, "username" set :use_sudo, false # ============================================================================= # CUSTOM OPTIONS # ============================================================================= set :user, "username" set :application, "application.com" set :domain, "my.ip.address.here" set :alias, %{ application.com } role :web, domain role :app, domain role :db, domain, :primary => true # ============================================================================= # DATABASE OPTIONS # ============================================================================= set :rails_env, "production" # ============================================================================= # DEPLOY TO # ============================================================================= set :deploy_to, "/home/#{user}/#{application}" # ============================================================================= # REPOSITORY # ============================================================================= set :scm, "git" set :deploy_via, :remote_cache set :repository, "/home/#{user}/reponame.git" # ============================================================================= # SSH OPTIONS # ============================================================================= default_run_options[:pty] = true ssh_options[:paranoid] = false ssh_options[:keys] = %w(/Users/username/.ssh/id_rsa) ssh_options[:port] = 1600 |
http://www.softiesonrails.com/2008/6/5/the-absolute-moron-s-guide-to-capistrano-git-and-thin-edition
No Comments Yet
You can be the first to comment!
Leave a comment