# 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.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
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