aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/deploy.rb13
-rw-r--r--config/general.yml-example16
2 files changed, 23 insertions, 6 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
index 4eb961a14..fb056991a 100644
--- a/config/deploy.rb
+++ b/config/deploy.rb
@@ -1,12 +1,13 @@
-set :application, "set your application name here"
-set :repository, "set your repository location here"
+# Deploy to staging by default unless you specify '-S stage=production' on the command line
+set :stage, 'staging' unless exists? :stage
+configuration = YAML.load_file('config/general.yml')['deployment'][stage]
+
+set :application, 'alaveteli'
set :scm, :git
+set :user, configuration['user']
-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"
+server configuration['server'], :app, :web, :db, :primary => true
namespace :deploy do
desc "Restarting mod_rails with restart.txt"
diff --git a/config/general.yml-example b/config/general.yml-example
index a6f657d96..0cfdc4bfb 100644
--- a/config/general.yml-example
+++ b/config/general.yml-example
@@ -157,3 +157,19 @@ VARNISH_HOST: localhost
# Adding a value here will enable Google Analytics on all non-admin pages.
GA_CODE: ''
+
+## Capistrano Deployment
+#
+# This section contains site-specific config that allows you to deploy
+# Alaveteli using Capistrano
+deployment:
+ production:
+ repository: git@github.com:mysociety/alaveteli.git
+ branch: master
+ server: www.example.com
+ path: /srv/www/alaveteli_production
+ staging:
+ branch: develop
+ repository: git@github.com:mysociety/alaveteli.git
+ server: test.example.com
+ path: /srv/www/alaveteli_staging