Skip to content

Instantly share code, notes, and snippets.

Summary:

  1. Add Capistrano and other relevant gems to Gemfile.
  # Deployment
  gem 'capistrano', '< 5'
  gem 'capistrano-rvm'
  gem 'capistrano-rails'
  gem 'capistrano-bundler'

Step 1 - Initial Server Setup

Assuming you already ssh-ed into the server as root.

Create a new user

We need to set up a new user account with reduced privileges for day-to-day use.

sudo adduser deploy
@fzrhrs
fzrhrs / bash.md
Created January 24, 2018 11:31
Cheatsheet

grep something from text file: grep "phrase-here" production.log; tail -f production.log

@fzrhrs
fzrhrs / django.md
Last active November 9, 2016 03:28
Setup django on Mac

Python 2.7 django pip install django

to use mysql pip install MySQL-Python or maybe pip install mysqlclient

database example:

@fzrhrs
fzrhrs / ghostonmac.md
Created April 16, 2016 01:39
Ghost on Mac and Heroku

Local mac: npm install --production

sudo echo node_modules > .gitignore git init git add . git commit -m 'Initial commit'

heroku create app-name

count rows SELECT COUNT(column_name) FROM table_name;