Sha256: 0b42f1281e668cc654824a8d9e1dbb5ebb94b49f75865d4b6f08049055a8505c

Contents?: true

Size: 1.06 KB

Versions: 10

Compression:

Stored size: 1.06 KB

Contents

## nginx.rb
#
# Adds capistrano3/nginx specific variables and tasks

namespace :load do
  task :defaults do

    set :nginx_ssl_certificate_path,     -> { "#{shared_path}/ssl" }
    set :nginx_ssl_certificate_key,      -> { "#{fetch(:application)}.key" }
    set :nginx_ssl_certificate_key_path, -> { "#{shared_path}/ssl" }

  end
end

# Adds some task on complement the capistrano3-nginx tasks
# This tasks are under the negroku namespace for easier identification
namespace :negroku do

    namespace :nginx do
        # Reload or restart unicorn after the application is published
        after 'deploy:publishing', 'restart' do
          invoke 'nginx:site:add'
          invoke 'nginx:site:enable'
          invoke 'nginx:reload'
        end

        define_logs(:nginx, {
          error: 'nginx-error.log',
          access: 'nginx-access.log'
        })
    end
end

# Ensure the folders needed exist
task 'deploy:check:directories' do
  on release_roles fetch(:nginx_roles) do
    if fetch(:nginx_use_ssl)
      execute :mkdir, '-pv', "#{shared_path}/ssl"
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
negroku-2.8.6 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.5 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.4 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.3 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.2 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.1 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.8.0 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.7.1 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.7.0 lib/negroku/capistrano/tasks/nginx.rake
negroku-2.6.0 lib/negroku/capistrano/tasks/nginx.rake