Sha256: 02d83b7c555afae33885394162a8b8c0da13201d08eeb35c0e51ae85dd92d3a8

Contents?: true

Size: 639 Bytes

Versions: 1

Compression:

Stored size: 639 Bytes

Contents

namespace :load do
  task :defaults do
    set :puma_nginx, :web
  end
end

namespace :puma do
  desc "Setup nginx configuration"
  task :nginx_config do
    fail ":puma_nginx role not set!" if roles(:puma_nginx).empty?
    on roles(:puma_nginx) do |role|
      template_puma("nginx_conf", "/tmp/nginx_#{fetch(:nginx_config_name)}", role)
      sudo :mv, "/tmp/nginx_#{fetch(:nginx_config_name)} #{fetch(:nginx_sites_available_path)}/#{fetch(:nginx_config_name)}"
      sudo :ln, '-fs', "#{fetch(:nginx_sites_available_path)}/#{fetch(:nginx_config_name)} #{fetch(:nginx_sites_enabled_path)}/#{fetch(:nginx_config_name)}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
capistrano3-puma-0.8.1 lib/capistrano/tasks/nginx.cap