Skip to content
Browse files

updating deploy.rb script

  • Loading branch information...
1 parent 6ac4d17 commit 2791d15c98f03f0703a062e2a46c8fed4cc247a2 @ryanb committed Dec 7, 2010
Showing with 7 additions and 14 deletions.
  1. +7 −14 config/deploy.rb
View
21 config/deploy.rb
@@ -1,4 +1,8 @@
-set :application, "dailystamp.com"
+set :whenever_command, "bundle exec whenever"
+require "bundler/capistrano"
+require "whenever/capistrano"
+
+set :application, "beta.dailystamp.com"
role :app, application
role :web, application
role :db, application, :primary => true
@@ -7,7 +11,6 @@
set :deploy_to, "/var/apps/dailystamp"
set :deploy_via, :remote_cache
set :use_sudo, false
-set :ssh_options, { :forward_agent => true }
set :scm, "git"
set :repository, "git://github.com/ryanb/dailystamp.git"
@@ -18,7 +21,7 @@
task :restart, :roles => :web do
run "touch #{deploy_to}/current/tmp/restart.txt"
end
-
+
desc "Do nothing on startup so we don't get a script/spin error."
task :start do
puts "You may need to restart Apache."
@@ -27,9 +30,7 @@
desc "Symlink extra configs and folders."
task :symlink_extras do
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
- run "ln -nfs #{shared_path}/config/app_config.yml #{release_path}/config/app_config.yml"
run "ln -nfs #{shared_path}/config/session_secret.txt #{release_path}/config/session_secret.txt"
- run "ln -nfs #{shared_path}/db/production.sqlite3 #{release_path}/db/production.sqlite3"
run "ln -nfs #{shared_path}/assets #{release_path}/public/assets"
end
@@ -38,18 +39,11 @@
run "mkdir #{shared_path}/assets"
run "mkdir #{shared_path}/config"
run "mkdir #{shared_path}/db"
- run "mkdir #{shared_path}/db/sphinx"
put File.read("config/database.example.yml"), "#{shared_path}/config/database.yml"
- put File.read("config/app_config.example.yml"), "#{shared_path}/config/app_config.yml"
put File.read("config/session_secret.example.txt"), "#{shared_path}/config/session_secret.txt"
puts "Now edit the config files and fill assets folder in #{shared_path}."
end
-
- desc "Update the crontab file"
- task :update_crontab, :roles => :db do
- run "cd #{release_path} && whenever --update-crontab #{application}"
- end
-
+
desc "Make sure there is something to deploy"
task :check_revision, :roles => :web do
unless `git rev-parse HEAD` == `git rev-parse origin/master`
@@ -64,4 +58,3 @@
after "deploy", "deploy:cleanup" # keeps only last 5 releases
after "deploy:setup", "deploy:setup_shared"
after "deploy:update_code", "deploy:symlink_extras"
-# after "deploy:symlink", "deploy:update_crontab"

0 comments on commit 2791d15

Please sign in to comment.
Something went wrong with that request. Please try again.