Skip to content

Instantly share code, notes, and snippets.

@cefigueiredo
Last active December 24, 2015 23:28
Show Gist options
  • Select an option

  • Save cefigueiredo/6879939 to your computer and use it in GitHub Desktop.

Select an option

Save cefigueiredo/6879939 to your computer and use it in GitHub Desktop.
Testing deploy on aws
apt-get -y update
apt-get -y install curl git-core python-software-properties python g++ make
# nginx
add-apt-repository ppa:nginx/stable
apt-get -y update
apt-get -y install nginx
service nginx start
# PostgreSQL
add-apt-repository ppa:pitti/postgresql
apt-get -y update
apt-get -y install postgresql libpq-dev
sudo su postgres
psql
# \password
# create user blog with password 'secret';
# create database blog_production owner blog;
# \q
# Node.js
add-apt-repository ppa:chris-lea/node.js
apt-get -y update
apt-get -y install nodejs
# Add deployer user
adduser deployer --ingroup admin
su deployer
cd
# rbenv
# curl -L https://raw.github.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
# vim ~/.bashrc # add rbenv to the top
# . ~/.bashrc
# rbenv bootstrap-ubuntu-10-04
# rbenv install 1.9.3-p125
# rbenv global 1.9.3-p125
# gem install bundler --no-ri --no-rdoc
# rbenv rehash
#rvm
curl -L https://get.rvm.io | bash -s stable
rvm install 2.0.0
gem install bundler --no-ri --no-rdoc
# get to know github.com
ssh [email protected]
# after deploy:cold
sudo rm /etc/nginx/sites-enabled/default
sudo service nginx restart
sudo update-rc.d -f unicorn_blog defaults
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment