aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2018-04-02 10:56:03 +0200
committerHarald Eilertsen <haraldei@anduin.net>2018-04-02 10:56:03 +0200
commitd298fd7776427e74c425326d6bbdcc1d0a57d4e5 (patch)
treebd70321a5a636f75ca9bb7e4403e5775c58fbdc6 /config
parent522ec9f2b4a370b520c014fcfaed5a50a438f6a6 (diff)
downloadhmnoweb-d298fd7776427e74c425326d6bbdcc1d0a57d4e5.tar.gz
hmnoweb-d298fd7776427e74c425326d6bbdcc1d0a57d4e5.tar.bz2
hmnoweb-d298fd7776427e74c425326d6bbdcc1d0a57d4e5.zip
Commit deploy-configs to scm.
Diffstat (limited to 'config')
-rw-r--r--config/deploy.rb35
-rw-r--r--config/deploy/production.rb2
-rw-r--r--config/deploy/staging.rb6
3 files changed, 43 insertions, 0 deletions
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644
index 0000000..64135f7
--- /dev/null
+++ b/config/deploy.rb
@@ -0,0 +1,35 @@
+lock '3.10.1'
+
+set :application, 'hmno'
+set :repo_url, 'http://volse.anduin.net/gitrepos/hmnoweb.git'
+set :linked_files, %w{
+ config/initializers/refinery/core.rb
+ config/initializers/secret_token.rb
+ config/piwik.yml
+}
+set :linked_dirs, %w{
+ log
+ tmp/cache
+ tmp/index
+ tmp/pids
+ tmp/sockets
+ vendor/bundle
+ public/system
+}
+set :bundle_without, %w{development test deploy}.join(' ')
+
+set :deploy_to, '/home/hmno/webapp/main'
+
+set :pg_user, 'hmno_db_admin'
+set :pg_system_user, 'pgsql'
+set :pg_ask_for_password, true
+set :pg_no_sudo, true
+
+ask :piwik_site_id, 0
+ask :piwik_url, 'https://piwik.example.com'
+
+set :rbenv_type, :user
+set :rbenv_ruby, File.read('.ruby-version').strip()
+set :rbenv_prefix, "RBENV_ROOT=#{fetch(:rbenv_path)} RBENV_VERSION=#{fetch(:rbenv_ruby)} #{fetch(:rbenv_path)}/bin/rbenv exec"
+set :rbenv_map_bins, %w{rake gem bundle ruby rails}
+set :rbenv_roles, :all
diff --git a/config/deploy/production.rb b/config/deploy/production.rb
new file mode 100644
index 0000000..81993f8
--- /dev/null
+++ b/config/deploy/production.rb
@@ -0,0 +1,2 @@
+server 'volse.anduin.net', :user => 'hmno', :roles => %w{web app db}
+set :branch, 'master'
diff --git a/config/deploy/staging.rb b/config/deploy/staging.rb
new file mode 100644
index 0000000..48e1b4d
--- /dev/null
+++ b/config/deploy/staging.rb
@@ -0,0 +1,6 @@
+server 'volse.local', :user => 'hmno', :roles => %w{web app db}
+
+set piwik_disabled, true
+
+# Ask for which branch to deploy, default is current branch.
+ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }.call