Last active
December 24, 2015 23:28
-
-
Save cefigueiredo/6879939 to your computer and use it in GitHub Desktop.
Testing deploy on aws
This file contains hidden or 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
| 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