lib/caploy/recipes/nginx.rb in caploy-0.1.5 vs lib/caploy/recipes/nginx.rb in caploy-0.1.6
- old
+ new
@@ -26,11 +26,11 @@
#run "sudo god restart nginx"
run "sudo /etc/init.d/nginx restart"
end
task :setup, :roles => :web do
- protocol = fetch(:protocol, nil).to_s
+ protocol = fetch(:nginx_protocol, nil).to_s
template_path = File.expand_path('../../templates/nginx/vhost.erb', __FILE__)
vars = {
'application' => application,
'project_root' => deploy_to + '/current',
'domain' => vhost_domain, 'stage' => stage,
@@ -44,11 +44,12 @@
'optional_https_content' => fetch(:optional_nginx_server_https_content, ''),
'optional_nginx_http_content' => fetch(:optional_nginx_http_content, ''),
'optional_nginx_https_content' => fetch(:optional_nginx_https_content, ''),
'cert_type' => fetch(:cert_type, 'pem'),
'key_type' => fetch(:cert_type, 'key'),
- 'serve_static_files' => fetch(:serve_static_files, true),
+ 'serve_static_files' => fetch(:nginx_serve_static_files, true),
+ 'new_relic_support' => fetch(:nginx_new_relic_support, false)
}
sites_path = fetch(:nginx_sites_enabled_path, "/etc/nginx/sites-enabled")
if protocol.nil? or protocol == 'http' or protocol == 'both'
@@ -74,10 +75,10 @@
end
end
end
task :uninstall do
- protocol = fetch(:protocol, nil)
+ protocol = fetch(:nginx_protocol, nil)
sites_path = fetch(:nginx_sites_enabled_path, "/etc/nginx/sites-enabled")
with_user(fetch(:setup_user, user)) do
if protocol.blank? or protocol == 'http' or protocol == 'both'
try_sudo "rm -f #{sites_path}/#{application}_#{stage}.conf"