skater coder

angela chng – Ruby on Rails / PHP web developer & skater girl in Singapore

  • blogabout stuff
  • aboutthis website
  • contactdrop a message

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

Leave a comment

Posted Under Rails

No Comments Yet

You can be the first to comment!

Leave a comment

* = Required

  • CATEGORIES
    • Coding Tips
    • ExtJS 4
    • Food
    • Portfolio
    • Rails
    • Sharepoint
    • Ubuntu
    • Wordpress

  • TAGS
    activities AD ADAM ajax architecture authentication bluehost books custom application custom form date design disk partition ECTS event id eventid moss forum guid hotfix iis imap keberos list id lists masterpage moss mysite profiles Rails rails 2.0 reporting services ruby Sharepoint sharepoint 2007 site templates site usage sql server 2005 time updates vhd virtual pc visual studio webparts workflow wss

Subscribe via RSS