diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/deploy.rb | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/config/deploy.rb b/config/deploy.rb index 43ec4c6..9456fef 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -3,11 +3,13 @@ lock '3.6.0' set :application, 'registration' set :repo_url, 'https://github.com/snake66/norsk-urskog-registrations.git' -set :deploy_to, '/home/norskurskog/www/registration' +set :deploy_to, '/usr/home/norskurskog/www/registration' set :linked_files, fetch(:linked_files, []).push('config.yml') # Default value for linked_dirs is [] -set :linked_dirs, fetch(:linked_dirs, []).push('public/uploads') +set :linked_dirs, fetch(:linked_dirs, []).push('public/uploads', 'bin', 'log', 'tmp') + +set :bundle_binstubs, -> { shared_path.join('bin') } # Default value for default_env is {} # set :default_env, { path: "/opt/ruby/bin:$PATH" } @@ -35,6 +37,19 @@ namespace :deploy do end end + file 'nu_regform' do |f| + template = IO.read('config/deploy/templates/thinrc.erb') + res = ERB.new(template).result(binding) + IO.write(t.name, res) + end + + #after :updated, :upload_init_script => 'nu_regform' do |t| + # on roles(:app) do + # shared_dir = File.join(fetch(:deploy_to), 'shared') + # upload!(t.prerequisites.first, File.join(shared_dir, t.prerequisites.first)) + # end + #end + after :restart, :clear_cache do on roles(:web), in: :groups, limit: 3, wait: 10 do # Here we can do anything such as: |