Skip to content
This repository has been archived by the owner on Apr 24, 2019. It is now read-only.

Commit

Permalink
Setups capistrano deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nbantatua committed Jun 4, 2014
1 parent e8379c2 commit f7735c1
Show file tree
Hide file tree
Showing 6 changed files with 137 additions and 0 deletions.
1 change: 1 addition & 0 deletions .ruby-gemset
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fries
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.9.3
4 changes: 4 additions & 0 deletions Capfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
load 'deploy'
# Uncomment if you are using Rails' asset pipeline
# load 'deploy/assets'
load 'config/deploy' # remove this line to skip loading any of the default tasks
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'jekyll'
gem 'capistrano'
gem 'capistrano-unicorn'
gem 'rvm-capistrano'
83 changes: 83 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
GEM
remote: https://rubygems.org/
specs:
blankslate (2.1.2.4)
capistrano (2.15.5)
highline
net-scp (>= 1.0.0)
net-sftp (>= 2.0.0)
net-ssh (>= 2.0.14)
net-ssh-gateway (>= 1.1.0)
capistrano-unicorn (0.2.0)
capistrano (< 3.0)
celluloid (0.15.2)
timers (~> 1.1.0)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
colorator (0.1)
execjs (2.1.0)
fast-stemmer (1.0.2)
ffi (1.9.3)
highline (1.6.21)
jekyll (2.0.3)
classifier (~> 1.3)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-sass-converter (~> 1.0)
kramdown (~> 1.3)
liquid (~> 2.5.5)
listen (~> 2.5)
mercenary (~> 0.3.3)
pygments.rb (~> 0.5.0)
redcarpet (~> 3.1)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.0)
coffee-script (~> 2.2)
jekyll-sass-converter (1.0.0)
sass (~> 3.2)
kramdown (1.3.3)
liquid (2.5.5)
listen (2.7.6)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
mercenary (0.3.3)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.8)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.4)
ffi (>= 0.5.0)
redcarpet (3.1.2)
rvm-capistrano (1.5.2)
capistrano (~> 2.15.4)
safe_yaml (1.0.3)
sass (3.3.8)
timers (1.1.0)
toml (0.1.1)
parslet (~> 1.5.0)
yajl-ruby (1.1.0)

PLATFORMS
ruby

DEPENDENCIES
capistrano
capistrano-unicorn
jekyll
rvm-capistrano
42 changes: 42 additions & 0 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
require 'bundler/capistrano'
require 'rvm/capistrano'
require 'capistrano-unicorn'

before 'deploy:setup', 'rvm:install_rvm'
before 'deploy:setup', 'rvm:install_ruby'

set :application, "fries"
set :repository, 'git@github.com:jaunesarmiento/fries.git'
set :scm, :git
set :scm_verbose, true
set :deploy_via, :remote_cache
# set :copy_compression, :gzip
# set :use_sudo, false

set :user, "deploy"

set :deploy_to, "/data/#{application}"
set :branch, "capistrano"
set :app_server, :unicorn
set :default_run_options, { pty: true }
set :ssh_options, { forward_agent: true }


role :web, "106.186.25.187"

# before 'deploy:update', 'deploy:update_jekyll'

namespace :deploy do
[:start, :stop, :restart, :finalize_update].each do |t|
desc "#{t} task is a no-op with jekyll"
task t, :roles => :app do ; end
end

desc 'Run jekyll to update site before uploading'
task :update_jekyll do
# clear existing _site
# build site using jekyll
# remove Capistrano stuff from build
%x(rm -rf _site/* && jekyll build && rm _site/Capfile && rm -rf _site/config)
end
end

0 comments on commit f7735c1

Please sign in to comment.