Skip to content

Instantly share code, notes, and snippets.

@cassioalmeidas
cassioalmeidas / Gemfile
Created March 1, 2016 18:35 — forked from nebiros/Gemfile
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@cassioalmeidas
cassioalmeidas / deploy.rb
Last active August 29, 2015 14:12 — forked from stas/deploy.rb
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv' # for rbenv support. (http://rbenv.org)
# require 'mina/rvm' # for rvm support. (http://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# deploy_to - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm' # for rvm support. (http://rvm.io)
set :domain, 'esdb.cn'
set :identity_file, '/User/somebody/.ssh/somebody.pem'
set :deploy_to, '/home/ubuntu/apps/xxx.com'
set :repository, 'ssh://git@bitbucket.org/somebody/xxx.com.git'
set :branch, 'master'
# This uses the Sequel gem to do the heavy lifting of connecting together the various
# DBs involved in this process. It was really difficult 2 weeks ago, and really easy yesterday.
# I love that.
require 'sequel'
require 'date'
# The Drupal DB
DB = Sequel.connect(