Permalink
Browse files

capifying

  • Loading branch information...
dmitryme committed Sep 30, 2008
1 parent 3661ae2 commit 5a46c2b1bb63d9babe12c0faba0587f3b25f60fb
Showing with 53 additions and 0 deletions.
  1. +3 −0 Capfile
  2. +42 −0 config/deploy.rb
  3. +8 −0 script/spin
View
@@ -0,0 +1,3 @@
+load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) }
+load 'config/deploy'
View
@@ -0,0 +1,42 @@
+set :application, "echowaves"
+
+default_run_options[:pty] = true
+
+# ssh_options[:forward_agent] = true
+set :branch, "master"
+set :deploy_via, :remote_cache
+set :runner, nil
+# set :git_shallow_clone, 1
+
+# set :deploy_to, "/u/apps/#{application}"
+
+# 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}"
+
+# If you aren't using Subversion to manage your source code, specify
+# your SCM below:
+# this is a public repository, is used in readonly mode. The only way to change something in prod is through doing another prod deploy
+set :repository, "git://github.com/dmitryame/echowaves.git"
+set :scm, "git"
+
+#set :mongrel_conf, "#{deploy_to}/current/config/mongrel_cluster.yml"
+
+# set :scm_passphrase, "p@ssw0rd" #This is your custom users password
+set :user, "deployer"
+
+role :app, "echowaves.com"
+role :web, "echowaves.com"
+role :db, "echowaves.com", :primary => true
+
+
+namespace :deploy do
+
+ task :copy_prod_configuration do
+ run "cp /u/config/#{application}/database.yml #{release_path}/config/"
+ run "cp /u/config/#{application}/environment.rb #{release_path}/config/"
+ end
+
+ after "deploy:update_code", "deploy:copy_prod_configuration"
+end
View
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+/u/apps/echowaves/current/script/process/spawner \
+ mongrel \
+ --environment=production \
+ --instances=1 \
+ --address=127.0.0.1 \
+ --port=8050

0 comments on commit 5a46c2b

Please sign in to comment.