Permalink
Browse files

More cleanup of config / Cap files

  • Loading branch information...
1 parent ceaeca7 commit 9414374510f1cac041dec900ace5c3eaaa0cc045 Carl Tashian committed Nov 13, 2009
Showing with 7 additions and 184 deletions.
  1. +1 −1 Capfile
  2. +2 −13 config/deploy-production.rb
  3. +4 −14 config/deploy.rb
  4. +0 −48 config/deploy_nv.rb
  5. +0 −51 config/deploy_orig.rb
  6. +0 −51 config/deploy_real.rb
  7. +0 −6 config/locomotive.yml
View
@@ -1,3 +1,3 @@
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
-load 'config/deploy-production'
+load 'config/deploy'
@@ -1,15 +1,10 @@
#require 'palmtree/recipes/mongrel_cluster'
-
set :application, "opencongress"
-#set :repository, "svn+ssh://db.opencongress.org/var/svn/opencongress/trunk/"
-#set :repository, "svn+ssh://db.opencongress.org/var/svn/opencongress/branches/maple"
-#set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
-
default_run_options[:pty] = true
set :repository, "git@github.com:opencongress/opencongress.git"
-set :scm, "git"
+set :scm, :git
set :git_shallow_clone, 1
# If you aren't deploying to /u/apps/#{application} on the target
@@ -20,13 +15,8 @@
set :deploy_to, "/u/apps/opencongress"
set :rails_env, "production"
+set :keep_releases, 4
set :use_sudo, true
-#false
-#set :mongrel_prefix, "#{current_path}"
-
-# If you aren't using Subversion to manage your source code, specify
-# your SCM below:
-# set :scm, :subversion
role :web, "75.126.164.19", :asset_host_syncher => true
role :web, "74.86.203.130"
@@ -40,7 +30,6 @@
run "cp #{deploy_to}/#{shared_dir}/database.yml #{current_release}/config/database.yml"
run "cp #{deploy_to}/#{shared_dir}/api_keys.yml #{current_release}/config/api_keys.yml"
run "cp #{deploy_to}/#{shared_dir}/facebooker.yml #{current_release}/config/facebooker.yml"
- run "cp #{deploy_to}/#{shared_dir}/mongrel_cluster.yml #{current_release}/config/mongrel_cluster.yml"
run "cp #{deploy_to}/#{shared_dir}/settings.php #{current_release}/public/forum/conf/settings.php"
run "cp #{deploy_to}/#{shared_dir}/database.php #{current_release}/public/forum/conf/database.php"
run "ln -s #{deploy_to}/#{shared_dir}/states #{current_release}/public/images/states"
View
@@ -2,32 +2,24 @@
set :application, "opencongress-dev"
-set :repository, "svn+ssh://db.opencongress.org/var/svn/opencongress/branches/maple"
-#set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
+set :repository, "git://github.com/opencongress/opencongress.git"
+set :scm, :git
+set :git_shallow_clone, 1
set(:scm_username) do
Capistrano::CLI.ui.ask "Give me a username: "
end
-# If you aren't deploying to /u/apps/#{application} on the target
-# servers (which is the default), you can specify the actual location
-# via the :deploy_to variable:
-# set :deploy_to, "/var/www/#{application}"
default_run_options[:pty] = true
set :deploy_to, "/u/apps/opencongress-dev"
set(:user) do
Capistrano::CLI.ui.ask "Give me a ssh user: "
end
-
set :use_sudo, true
set :rails_env, "staging"
-#set :mongrel_prefix, "#{current_path}"
-
-# If you aren't using Subversion to manage your source code, specify
-# your SCM below:
-# set :scm, :subversion
+set :keep_releases, 4
role :web, "dev.opencongress.org", :asset_host_syncher => true
role :app, "dev.opencongress.org"
@@ -38,7 +30,6 @@
run "cp #{deploy_to}/#{shared_dir}/database.yml #{current_release}/config/database.yml"
run "cp #{deploy_to}/#{shared_dir}/api_keys.yml #{current_release}/config/api_keys.yml"
run "cp #{deploy_to}/#{shared_dir}/facebooker.yml #{current_release}/config/facebooker.yml"
- run "cp #{deploy_to}/#{shared_dir}/mongrel_cluster.yml #{current_release}/config/mongrel_cluster.yml"
run "cp #{deploy_to}/#{shared_dir}/settings.php #{current_release}/public/forum/conf/settings.php"
run "cp #{deploy_to}/#{shared_dir}/database.php #{current_release}/public/forum/conf/database.php"
run "ln -s #{deploy_to}/#{shared_dir}/states #{current_release}/public/images/states"
@@ -55,7 +46,6 @@
run "ln -s #{deploy_to}/#{shared_dir}/files/facebooker.yml #{current_release}/config/"
run "ln -s #{deploy_to}/#{shared_dir}/files/synch_s3_asset_host.yml #{current_release}/config/"
run "ln -s #{deploy_to}/#{shared_dir}/files/facebook.yml #{current_release}/config/"
-
run "ln -s /u/apps/opencongress-dev/shared/robots_all.txt #{current_release}/public/robots.txt"
run "touch #{current_release}/tmp/restart.txt"
sudo "chown -R mongrel:admins #{current_release}"
View
@@ -1,48 +0,0 @@
-require 'palmtree/recipes/mongrel_cluster'
-set :runner, "deploy"
-set :user, "deploy"
-set :application, "opencongress"
-
-set :repository, "svn+ssh://npverni@db.opencongress.org/var/svn/opencongress/branches/nv-political-notebook"
-set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
-
-default_run_options[:pty] = true
-set :deploy_to, "/u/apps/opencongress"
-
-set :use_sudo, true
-#false
-#set :rails_env, "staging"
-set :mongrel_prefix, "#{current_path}"
-
-# If you aren't using Subversion to manage your source code, specify
-# your SCM below:
-# set :scm, :subversion
-
-role :web, "209.20.73.35"
-role :app, "209.20.73.35"
-role :db, "209.20.73.35", :primary => true
-
-desc "Link the images"
-task :link_images do
- run "cp #{deploy_to}/#{shared_dir}/database.yml #{current_release}/config/database.yml"
- run "cp #{deploy_to}/#{shared_dir}/mongrel_cluster.yml #{current_release}/config/mongrel_cluster.yml"
- run "cp #{deploy_to}/#{shared_dir}/settings.php #{current_release}/public/forum/conf/settings.php"
- run "cp #{deploy_to}/#{shared_dir}/database.php #{current_release}/public/forum/conf/database.php"
- run "ln -s #{deploy_to}/#{shared_dir}/user_images #{current_release}/public/images/users"
- run "ln -s #{deploy_to}/#{shared_dir}/index #{current_release}/index"
- run "ln -s #{deploy_to}/#{shared_dir}/wiki #{current_release}/public/wiki"
- run "ln -s /data/govtrack/109/repstats/images/people #{current_release}/public/images/people"
- run "ln -s /data/govtrack/photos #{current_release}/public/images/photos"
- run "ln -s /data/blog #{current_release}/public/images/blog"
- sudo "chown -R mongrel:nogroup #{current_release}"
-end
-
-
-namespace :deploy do
-
- task :after_symlink do
- link_images
- # ...
- end
-
-end
View
@@ -1,51 +0,0 @@
-require 'palmtree/recipes/mongrel_cluster'
-
-set :application, "opencongress-dev"
-
-set :repository, "svn+ssh://10.13.219.4/var/svn/opencongress/trunk/"
-set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
-
-# If you aren't deploying to /u/apps/#{application} on the target
-# servers (which is the default), you can specify the actual location
-# via the :deploy_to variable:
-# set :deploy_to, "/var/www/#{application}"
-default_run_options[:pty] = true
-set :deploy_to, "/u/apps/opencongress-dev"
-
-set :use_sudo, true
-#false
-set :rails_env, "staging"
-set :mongrel_prefix, "#{current_path}"
-
-# If you aren't using Subversion to manage your source code, specify
-# your SCM below:
-# set :scm, :subversion
-
-role :web, "www.opencongress.org"
-role :app, "www.opencongress.org"
-role :db, "www.opencongress.org", :primary => true
-
-desc "Link the images"
-task :link_images do
- run "cp #{deploy_to}/#{shared_dir}/database.yml #{current_release}/config/database.yml"
- run "cp #{deploy_to}/#{shared_dir}/mongrel_cluster.yml #{current_release}/config/mongrel_cluster.yml"
- run "cp #{deploy_to}/#{shared_dir}/settings.php #{current_release}/public/forum/conf/settings.php"
- run "cp #{deploy_to}/#{shared_dir}/database.php #{current_release}/public/forum/conf/database.php"
- run "ln -s #{deploy_to}/#{shared_dir}/user_images #{current_release}/public/images/users"
- run "ln -s #{deploy_to}/#{shared_dir}/index #{current_release}/index"
- run "ln -s #{deploy_to}/#{shared_dir}/wiki #{current_release}/public/wiki"
- run "ln -s /data/govtrack/109/repstats/images/people #{current_release}/public/images/people"
- run "ln -s /data/govtrack/photos #{current_release}/public/images/photos"
- run "ln -s /data/blog #{current_release}/public/images/blog"
- sudo "chown -R mongrel:nogroup #{current_release}"
-end
-
-
-namespace :deploy do
-
- task :after_symlink do
- link_images
- # ...
- end
-
-end
View
@@ -1,51 +0,0 @@
-require 'palmtree/recipes/mongrel_cluster'
-
-set :application, "opencongress-dev"
-
-set :repository, "svn+ssh://10.13.219.4/var/svn/opencongress/trunk/"
-set :mongrel_conf, "#{current_path}/config/mongrel_cluster.yml"
-
-# If you aren't deploying to /u/apps/#{application} on the target
-# servers (which is the default), you can specify the actual location
-# via the :deploy_to variable:
-# set :deploy_to, "/var/www/#{application}"
-default_run_options[:pty] = true
-set :deploy_to, "/u/apps/opencongress-dev"
-
-set :use_sudo, true
-#false
-set :rails_env, "staging"
-set :mongrel_prefix, "#{current_path}"
-
-# If you aren't using Subversion to manage your source code, specify
-# your SCM below:
-# set :scm, :subversion
-
-role :web, "www.opencongress.org"
-role :app, "www.opencongress.org"
-role :db, "www.opencongress.org", :primary => true
-
-desc "Link the images"
-task :link_images do
- run "cp #{deploy_to}/#{shared_dir}/database.yml #{current_release}/config/database.yml"
- run "cp #{deploy_to}/#{shared_dir}/mongrel_cluster.yml #{current_release}/config/mongrel_cluster.yml"
- run "cp #{deploy_to}/#{shared_dir}/settings.php #{current_release}/public/forum/conf/settings.php"
- run "cp #{deploy_to}/#{shared_dir}/database.php #{current_release}/public/forum/conf/database.php"
- run "ln -s #{deploy_to}/#{shared_dir}/user_images #{current_release}/public/images/users"
- run "ln -s #{deploy_to}/#{shared_dir}/index #{current_release}/index"
- run "ln -s #{deploy_to}/#{shared_dir}/wiki #{current_release}/public/wiki"
- run "ln -s /data/govtrack/109/repstats/images/people #{current_release}/public/images/people"
- run "ln -s /data/govtrack/photos #{current_release}/public/images/photos"
- run "ln -s /data/blog #{current_release}/public/images/blog"
- sudo "chown -R mongrel:nogroup #{current_release}"
-end
-
-
-namespace :deploy do
-
- task :after_symlink do
- link_images
- # ...
- end
-
-end
View
@@ -1,6 +0,0 @@
----
-mode: development
-runs_at_launch: 0
-identifier: trunk
-port: 3000
-bundle: /Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle

0 comments on commit 9414374

Please sign in to comment.