Permalink
Browse files

added git deployment options and update readme

  • Loading branch information...
1 parent 5db73b5 commit 881ea450ab3d004bd521d1766d33fb3cced3032a Brian Gonzalez committed May 29, 2012
Showing with 68 additions and 0 deletions.
  1. +2 −0 Gemfile
  2. +2 −0 Gemfile.lock
  3. +6 −0 README.md
  4. +10 −0 app.rb
  5. +30 −0 config/deploy.git.rb
  6. +6 −0 config/deploy.git/production.rb
  7. +6 −0 config/deploy.git/staging.rb
  8. +6 −0 content/pages/blog/getting-started.mdown
View
@@ -4,6 +4,8 @@ gem "nesta", :git => "git://github.com/gma/nesta.git"
gem 'maruku'
gem 'rack-pygmoku'
+gem 'capistrano_colors'
+
gem 'compass'
gem 'compass-h5bp'
gem 'sinatra'
View
@@ -18,6 +18,7 @@ GEM
addressable (2.2.8)
blankslate (2.1.2.4)
builder (3.0.0)
+ capistrano_colors (0.5.5)
capybara (1.1.2)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
@@ -107,6 +108,7 @@ PLATFORMS
ruby
DEPENDENCIES
+ capistrano_colors
capybara
compass
compass-h5bp
View
@@ -16,6 +16,12 @@ By default, Capistrano is setup to deploy from your current directory, no need t
Also, you'll want to edit `config/deploy.rb` with all of your server-specific info.
+## Using Git for Deployment
+
+If you'd like to use Git to deploy your Nesta site, rename `deploy.git.rb` to `deploy.rb` and delete/ or rename the other `deploy.rb` to `deploy.old.rb`. Lastly, rename the folder `deploy.git` to simply `deploy`, then you can:
+ $ cap deploy // deploy to stage, or...
+ $ cap production deploy // deploy to production
+
## What you get from Nesta Boilerplate
### Baked-In
View
@@ -15,6 +15,16 @@ class App
set :haml, { :format => :html5 }
end
+ helpers do
+ def path
+ request.path
+ end
+
+ def current_url
+ request.url
+ end
+ end
+
configure :production do
set :haml, { :ugly => true }
end
View
@@ -0,0 +1,30 @@
+require 'capistrano/ext/multistage'
+require 'capistrano_colors'
+
+set :stages, %w(staging production)
+set :default_stage, "staging"
+
+default_run_options[:pty] = true # Must be set for the password prompt from git to work
+set :deploy_via, :remote_cache
+set :branch, "master"
+set :scm, "git"
+set :user, "root" # The server's user for deploys
+ssh_options[:forward_agent] = true
+
+
+
+
+# if you want to clean up old releases on each deploy uncomment this:
+after "deploy:restart", "deploy:cleanup"
+
+# if you're still using the script/reaper helper you will need
+# these http://github.com/rails/irs_process_scripts
+
+# If you are using Passenger mod_rails uncomment this:
+namespace :deploy do
+ task :start do ; end
+ task :stop do ; end
+ task :restart, :roles => :app, :except => { :no_release => true } do
+ run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
+ end
+end
@@ -0,0 +1,6 @@
+set :application, 'nestabp.'
+set :repository, "git://github.com/briangonzalez/nesta-boilerplate.git" # Your clone URL
+set :location, "briangonzalez.org"
+set :deploy_to, "/srv/www/#{application}#{location}"
+role :web, location # Your HTTP server, Apache/etc
+role :app, location # This may be the same as your `Web` server
@@ -0,0 +1,6 @@
+set :application, "nestabp."
+set :repository, "git://github.com/briangonzalez/nesta-boilerplate.git" # Your clone URL
+set :location, "briangonzalez.org"
+set :deploy_to, "/srv/www/#{application}#{location}"
+role :web, location # Your HTTP server, Apache/etc
+role :app, location # This may be the same as your `Web` server
@@ -18,6 +18,12 @@ By default, Capistrano is setup to deploy from your current directory, no need t
Also, you'll want to edit `config/deploy.rb` with all of your server-specific info.
+## Using Git for Deployment
+
+If you'd like to use Git to deploy your Nesta site, rename `deploy.git.rb` to `deploy.rb` and delete/ or rename the other `deploy.rb` to `deploy.old.rb`. Lastly, rename the folder `deploy.git` to simply `deploy`, then you can:
+ $ cap deploy // deploy to stage, or...
+ $ cap production deploy // deploy to production
+
## What you get from Nesta Boilerplate
### Baked-In

0 comments on commit 881ea45

Please sign in to comment.