Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Capistrano

  • Loading branch information...
commit dcd164728c57bebfe04b5d71ff2adda75e60bee8 1 parent 5c06ffe
@luigi luigi authored
Showing with 57 additions and 0 deletions.
  1. +5 −0 Capfile
  2. +52 −0 config/deploy.rb
View
5 Capfile
@@ -0,0 +1,5 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+
+load 'config/deploy' # remove this line to skip loading any of the default tasks
+require 'bundler/capistrano'
View
52 config/deploy.rb
@@ -0,0 +1,52 @@
+set :environment, (ENV['target'] || 'staging')
+
+set :user, 'streamcongress'
+set :application, user
+set :deploy_to, "/home/streamcongress/www"
+
+if environment == 'production'
+ set :domain, "streamcongress.com"
+else
+ set :domain, "staging.streamcongress.com"
+end
+
+set :repository, "git@github.com:sunlightlabs/streamcongress.git"
+set :scm, 'git'
+set :use_sudo, false
+set :deploy_via, :remote_cache
+
+role :web, domain
+role :app, domain
+role :db, domain, :primary => true
+
+after "deploy", "deploy:cleanup"
+
+namespace :deploy do
+ task :restart, :roles => :app, :except => { :no_release => true } do
+ run "touch #{current_path}/tmp/restart.txt"
+ end
+
+
+ # task :symlink_config do
+ # run "ln -s #{shared_path}/config/keys.yml #{release_path}/config/keys.yml"
+ # run "ln -s #{shared_path}/config/mail.yml #{release_path}/config/mail.yml"
+ # end
+end
+
+# namespace :bundler do
+# task :install do
+# run("gem install bundler")
+# end
+#
+# task :symlink_vendor do
+# shared_gems = "#{shared_path}/vendor/gems"
+# release_gems = "#{release_path}/vendor/gems"
+# run("mkdir -p #{shared_gems} && mkdir -p #{release_gems} && rm -rf #{release_gems} && ln -s #{shared_gems} #{release_gems}")
+# end
+#
+# end
+#
+# after 'deploy:update_code' do
+# bundle.install
+# deploy.symlink_config
+#end
Please sign in to comment.
Something went wrong with that request. Please try again.