aboutsummaryrefslogtreecommitdiffstats
path: root/config/deploy.rb
blob: 524405f8a81cb97c7217c54826be806a6f49cbba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# This file is part of hmnoweb, a RefineryCMS based Webapp for heavymetal.no
# Copyright (C) 2018  Harald Eilertsen <haraldei@anduin.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.

lock '~> 3.10.0'

set :application, 'hmno'
set :repo_url, 'http://code.volse.no/hmnoweb.git'
set :linked_files, %w{
  config/initializers/refinery/core.rb
  config/initializers/secret_token.rb
  config/piwik.yml
  config/puma.rb
}
set :linked_dirs, %w{
  bin
  log
  tmp/cache
  tmp/index
  tmp/pids
  tmp/sockets
  vendor/bundle
  public/system
}
set :bundle_without, %w{development test deploy}.join(' ')
set :bundle_binstubs, -> { shared_path.join('bin') }
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)} rbenv exec"
set :rbenv_map_bins, %w{rake gem bundle ruby rails}
set :rbenv_roles, :all