lib/spontaneous/generators/site/config/deploy.rb.tt in spontaneous-0.2.0.alpha2 vs lib/spontaneous/generators/site/config/deploy.rb.tt in spontaneous-0.2.0.alpha3
- old
+ new
@@ -1,27 +1,55 @@
\ No newline at end of file
+ENV["SPOT_MODE"] = "console"
+
+require File.expand_path("../boot.rb", __FILE__)
+
+require "spontaneous/capistrano"
+require "bundler/capistrano"
+
+default_run_options[:pty] = true
+
+ssh_options[:port] = 22
+ssh_options[:forward_agent] = true
+
+set :application, "<%= @domain %>"
+server "<%= @domain %>", :app, :web, :db, :media
+set :user, "<%= @username %>"
+set :use_sudo, false
+
+
+set :scm, "git"
+set :repository, "git@<%= @domain %>:spontaneous.git"
+
+set :deploy_to, "/home/#{fetch(:user)}/spontaneous"
+
+namespace :deploy do
+ task :restart, :roles => [:app, :web] do
+ run "sv kill /home/#{fetch(:user)}/service/enabled/back"
+ end
+end