I am used to using capistrano
for auto deployment
- add user
deploy
on ubuntu, we'll do the deployment withdeploy
account - run install_sys_requirements.sh
gem "capistrano", "~> 3.1", require: false | |
gem "capistrano-rails", "~> 1.1", require: false | |
gem "capistrano-rbenv", "~> 2.0.3", require: false # production server use rbenv | |
gem 'capistrano-puma', require: false | |
gem 'capistrano-file-permissions' | |
gem 'dotenv-rails' |
#!/bin/bash | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 | |
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org=3.0.0 mongodb-org-server=3.0.0 mongodb-org-shell=3.0.0 mongodb-org-mongos=3.0.0 mongodb-org-tools=3.0.0 | |
sudo service mongod start |
sudo apt-get install git python-pip make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev | |
sudo pip install virtualenvwrapper | |
git clone https://github.com/yyuu/pyenv.git ~/.pyenv | |
git clone https://github.com/yyuu/pyenv-virtualenvwrapper.git ~/.pyenv/plugins/pyenv-virtualenvwrapper | |
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.zshrc | |
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(pyenv init -)"' >> ~/.zshrc | |
echo 'pyenv virtualenvwrapper' >> ~/.zshrc | |
zsh | |
pyenv install 3.4.3 | |
pyenv install 2.7.9 |
sudo apt-get install -y libssl-dev libreadline-dev zlib1g-dev | |
sudo apt-get install python2.7-dev python3.4-dev |
cd ~ | |
git clone git://github.com/sstephenson/rbenv.git .rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'eval "$(rbenv init -)"' >> ~/.bashrc | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(rbenv init -)"' >> ~/.zshrc | |
exec $SHELL | |
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc | |
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.zshrc | |
exec $SHELL | |
rbenv install 2.2.2 | |
rbenv global 2.2.2 | |
ruby -v |