summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorTyler Mercier <tylermercier@gmail.com>2013-07-22 15:03:02 -0600
committerTyler Mercier <tylermercier@gmail.com>2013-07-22 15:04:12 -0600
commitc306fa8b20ff7c24f26e657d7ac3a7e42dbe20de (patch)
treed9c1a2c95e14f61899684df37d9e9bbf122d96c8 /config
parent3f6280ddbff473e00370fdd0816733335f1ad1e9 (diff)
fill out cap deploy
Diffstat (limited to 'config')
-rw-r--r--config/deploy.rb58
1 files changed, 34 insertions, 24 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 6384621..fc5e2ac 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,26 +1,36 @@
+require "bundler/capistrano"
+
set :application, "parley"
+set :user, "demo"
+set :deploy_to, "/home/#{user}/apps/#{application}"
+set :deploy_via, :remote_cache # keeps git repo on server cache
+set :use_sudo, false
+set :scm, "git"
+set :branch, "master"
set :repository, "git@github.com:madebyuppercut/parley.git"
-set :deploy_to, "/home/username/apps/projectname/current/public"
-
-# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
-# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
-
-role :web, "your web-server here" # Your HTTP server, Apache/etc
-role :app, "your app-server here" # This may be the same as your `Web` server
-role :db, "your primary db-server here", :primary => true # This is where Rails migrations will run
-role :db, "your slave db-server here"
-
-# if you want to clean up old releases on each deploy uncomment this:
-# after "deploy:restart", "deploy:cleanup"
-
-# if you're still using the script/reaper helper you will need
-# these http://github.com/rails/irs_process_scripts
-
-# 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
+
+default_run_options[:pty] = true # password prompt
+ssh_options[:forward_agent] = true # no deploy key for github
+
+# Your HTTP server, Apache/etc
+role :web, "198.199.101.128"
+
+# This may be the same as your `Web` server
+role :app, "198.199.101.128"
+
+# This is where Rails migrations will run
+role :db, "198.199.101.128", primary: true
+#role :db, "your slave db-server here"
+
+after "deploy", "deploy:cleanup" # keep only the last 5 releases
+
+namespace :deploy do
+ task :restart, roles: :app do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+
+ task :symlink_config, roles: :app do
+ run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
+ end
+ after "deploy:finalize_update", "deploy:symlink_config"
+end