diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2018-01-13 16:47:29 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2018-01-13 16:47:29 +0100 |
commit | 6c5aaabe8bb0ae1b8025953f6a9c462846bbb873 (patch) | |
tree | 93f68b2d3307b8f64187444a769a92cebf135caa /lib/capistrano/tasks/configure_puma.rake | |
parent | 97130af8dd3f761bbc4cc085def3cd39b80b876e (diff) | |
parent | 00e2586a42931567d2ac18350d41dd882e7fcd92 (diff) | |
download | hmnoweb-6c5aaabe8bb0ae1b8025953f6a9c462846bbb873.tar.gz hmnoweb-6c5aaabe8bb0ae1b8025953f6a9c462846bbb873.tar.bz2 hmnoweb-6c5aaabe8bb0ae1b8025953f6a9c462846bbb873.zip |
Merge branch 'gallery-links'
Diffstat (limited to 'lib/capistrano/tasks/configure_puma.rake')
-rw-r--r-- | lib/capistrano/tasks/configure_puma.rake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/capistrano/tasks/configure_puma.rake b/lib/capistrano/tasks/configure_puma.rake new file mode 100644 index 0000000..ccea36b --- /dev/null +++ b/lib/capistrano/tasks/configure_puma.rake @@ -0,0 +1,15 @@ +# :mode=ruby: +namespace :deploy do + desc 'Configure Puma' + task :configure_puma do + target_file = File.join(shared_path, 'config', 'puma.rb') + on roles(:app) do + unless test "[ -f #{target_file} ]" + template = ERB.new(IO.read(File.join(Dir.pwd, 'config', 'deploy', 'templates', 'puma.rb.erb'))) + upload!(StringIO.new(template.result(binding)), target_file) + end + end + end + + before 'deploy:finishing', 'deploy:generate_secret_token' +end |