c8a3fe0d6d76a61abe253f46de28ae8262cd8c1b
[feedcatcher.git] / trunk / config / deploy.rb
1 set :application, "feedcatcher"
2 set :repository, "http://scripts.njae.me.uk/svn/m8rails/#{application}/branches/stable"
3
4 # If you aren't deploying to /u/apps/#{application} on the target
5 # servers (which is the default), you can specify the actual location
6 # via the :deploy_to variable:
7 set :deploy_to, "/var/www/feedcatcher.njae.me.uk/"
8
9 # If you aren't using Subversion to manage your source code, specify
10 # your SCM below:
11 set :scm, :subversion
12 set :scm_username, 'neil'
13
14 role :app, "feedcatcher.njae.me.uk"
15 role :web, "feedcatcher.njae.me.uk"
16 role :db, "feedcatcher.njae.me.uk", :primary => true
17
18 # Have the spinner/spawner/reaper processes run as the default user
19 set :runner, nil
20
21 # Copy the database.yml file across, as it's not kept in the SVN repository
22 after "deploy:update_code" , :configure_database
23 desc "copy database.yml into the current release path"
24 task :configure_database, :roles => :app do
25 db_config = "#{deploy_to}/config/database.yml"
26 run "cp #{db_config} #{release_path}/config/database.yml"
27 end
28
29
30 namespace :deploy do
31 task :start, :roles => :app do
32 end
33
34 task :stop, :roles => :app do
35 end
36
37 desc "Restart Application"
38 task :restart, :roles => :app do
39 run "touch #{release_path}/tmp/restart.txt"
40 end
41
42 end