Skip to content

Instantly share code, notes, and snippets.

@seifsallam
Last active December 18, 2015 12:39
Show Gist options
  • Save seifsallam/5784367 to your computer and use it in GitHub Desktop.
Save seifsallam/5784367 to your computer and use it in GitHub Desktop.
asknative server deployment setup

Deployment Setup

  1. Create user deployer added to root and www-data groups
  2. Setup github deploy keys. Guide
  3. Setup rbenv on deployer, install ruby 1.9.3 or 2.0, and bundler
  4. Install rbenv plugins rbenv-sudo, rbenv-rehash, and rbenv-vars
  5. Add Environment variables to rbevn vars,
  6. Install Nginx
  7. Comment # [ -z "$PS1" ] && return from bashrc, so using su - deployer in an non-interactive shell loads rbenv
  8. Fix locale problems by adding export LC_ALL="en_US.UTF-8" into ~/.bashrc
  9. Use sudo visudo append %deployer ALL=(ALL) ALL for allowing sudo command for group deployer, and deployer ALL=NOPASSWD: ALL no password for user deployer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment