Sha256: adcff183bbbb1c54002d8c43433b8ee19c649b0220ac27f40bfda1424641b287
Contents?: true
Size: 853 Bytes
Versions: 3
Compression:
Stored size: 853 Bytes
Contents
Capistrano::Configuration.instance.load do namespace :nginx do desc "Setup application in nginx" task "setup", :role => :web do config_file = "config/deploy/nginx_conf.erb" unless File.exists?(config_file) config_file = File.join(File.dirname(__FILE__), "../../generators/capistrano/nginx/templates/_nginx_conf.erb") end config = ERB.new(File.read(config_file)).result(binding) set :user, sudo_user put config, "/tmp/#{application}" run "#{sudo} mv /tmp/#{application} /etc/nginx/sites-available/#{application}" run "#{sudo} ln -fs /etc/nginx/sites-available/#{application} /etc/nginx/sites-enabled/#{application}" end desc "Reload nginx configuration" task :reload, :role => :web do set :user, sudo_user run "#{sudo} /etc/init.d/nginx reload" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
capistrano-nginx-0.1.0 | lib/capistrano/nginx/tasks.rb |
capistrano-nginx-0.0.2 | lib/capistrano/nginx/tasks.rb |
capistrano-nginx-0.0.1 | lib/capistrano/nginx/tasks.rb |