Skip to content

Instantly share code, notes, and snippets.

Rameshwar Rameshwar007

View GitHub Profile
View digitalocean.md

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Create droplet of your liking (ubuntu 12.10 x32)

ssh to root in terminal with your server ip

ssh root@123.123.123.123

Add ssh fingerprint and enter password provided in email

View Capistrano Postgresql
require "bundler/capistrano"
namespace :db do
require 'yaml'
desc "Copy the remote production database to the local development database NOTE: postgreSQL specific"
task :pg_backup_production, :roles => :db, :only => { :primary => true } do
# First lets get the remote database config file so that we can read in the database settings
tmp_db_yml = "tmp/database.yml"
get("#{shared_path}/config/database.yml", tmp_db_yml)
You can’t perform that action at this time.