lib/fdlcap/recipes/nginx.rb in factorylabs-fdlcap-0.2.1 vs lib/fdlcap/recipes/nginx.rb in factorylabs-fdlcap-0.2.2

- old
+ new

@@ -37,20 +37,20 @@ end end desc "Setup Nginx vhost config" task :vhost, :roles => :web do - result = render_erb_template(File.dirname(__FILE__) + "/templates/nginx.vhost.conf.erb") + result = render_erb_template(File.join(File.dirname(__FILE__), '..','templates','nginx.vhost.conf.erb')) put result, "/tmp/nginx.vhost.conf" sudo "mkdir -p /etc/nginx/vhosts" sudo "cp /tmp/nginx.vhost.conf /etc/nginx/vhosts/#{application}.conf" inform "You must edit nginx.conf to include the vhost config file." end desc "Setup Nginx vhost auth config" task :vhost_auth, :roles => :web do - result = render_erb_template(File.dirname(__FILE__) + "/templates/nginx.auth.conf.erb") + result = render_erb_template(File.join(File.dirname(__FILE__), '..','templates','nginx.auth.conf.erb')) put result, "/tmp/nginx.auth.conf" sudo "mkdir -p /etc/nginx/vhosts" sudo "cp /tmp/nginx.vhost.conf /etc/nginx/vhosts/#{application}.auth.conf" end @@ -72,10 +72,10 @@ desc "Setup Nginx.config" task :conf, :roles => :web do if can_configure_nginx - result = render_erb_template(File.dirname(__FILE__) + "/templates/nginx.conf.erb") + result = render_erb_template(File.join(File.dirname(__FILE__),'..','templates','nginx.conf.erb') put result, "/tmp/nginx.conf" sudo "cp /tmp/nginx.conf /etc/nginx/nginx.conf" else inform "Nginx configuration tasks have been disabled. Most likely you are deploying to engineyard which has it's own nginx conf setup." \ No newline at end of file