- Create or Copy Development machine's public RSA located
~/.ssh/id_rsa.pub
- Login to server and paste it in
vim ~/.ssh/authorized_keys
- Ensure that
/etc/ssh/sshd_config
containsPubkeyAuthentication yes
andRSAAuthentication yes
uncommented - Finally set
chmod go-w ~/
,chmod 700 ~/.ssh
, andchmod 600 ~/.ssh/authorized_keys
to make sure that permissions are set correctly
- Create user
deployer
added toroot
andwww-data
groups - Setup github deploy keys. Guide
- Setup rbenv on deployer, install ruby 1.9.3 or 2.0, and bundler
- Install rbenv plugins rbenv-sudo, rbenv-rehash, and rbenv-vars
- Add Environment variables to
rbevn vars
, - Install Nginx
- Comment
# [ -z "$PS1" ] && return
from bashrc, so usingsu - deployer
in an non-interactive shell loadsrbenv
- Fix
locale
problems by adding exportLC_ALL="en_US.UTF-8"
into~/.bashrc
- Use
sudo visudo
append%deployer ALL=(ALL) ALL
for allowing sudo command for group deployer, anddeployer ALL=NOPASSWD: ALL
no password for user deployer
- Mongoid for mongodb communication
- Devise for authentication and oAuth
- Active Model Serializer for JSON formatting. Alot cleaner and faster than hash views solutions like RABL
- Api versions for versioning API
- Sidekiq for background jobs. Awesome dashboard and alot easier (with less bugs) than resque
- HTTParty for sending push notifications to pushbots
- SendGrid for sending emails
- LetterOpener for viewing emails in the browser (Development)
- Roadie for compiling css to be inline for emails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"keys": ["ctrl+shift+t"], | |
"command": "delete_trailing_spaces" | |
}, | |
{ | |
"keys": ["ctrl+shift+d"], | |
"command": "toggle_trailing_spaces" | |
}, | |
{ |
First Generate Ember application using Yo Ember generator
- Install yeoman
npm install -g yo grunt-cli bower
- Install ember-generator
npm install -g generator-ember
- Create your project
mkdir webapp && cd webapp
- Generate ember template
yo ember
- Run it
grunt server
- I'm going to assume here that you have an ember application ready that you want to deploy.
- Install Generator Heroku using the steps there, and don't forget to add the block of code to your
gruntfile.js
. You should find the copy tag already there, just append to it - The run
grunt build command
to generate the/dist
folder. That will complie everything and generate your web-app - If you want you can test it using
grunt server:dist
- Now go to
/dist
folder - Create a heroku app
heroku create
- Commit everything in the dist folder (Don't go up to your root direcotry, you want to commit update to heroku) I used github to add local repo and manage everything from there.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// store.js | |
App.Adapter = DS.RESTAdapter.reopen({ | |
bulkCommit: false, | |
url: 'http://localhost:5000', | |
namespace: 'api', | |
corsWithCredentials: true, | |
headers: { | |
'Accept': 'application/vnd.vendor+json;version=1', | |
'Content-type': 'application/json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## | |
## NGINX helpers | |
## | |
# Kill and restart nginx | |
function restart_nginx(){ | |
pids=$(pidof nginx) | |
if [[ -n $pids ]]; | |
then | |
sudo kill -9 $pids |
- Install Homebrew
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
- Install imageMagik
brew install imagemagick
brew update
brew install rbenv
brew install ruby-build
. Replace ruby-build with any ruby version you want- Install rbenv-vars
- Install rbenv-rehash
OlderNewer