Skip to content

Instantly share code, notes, and snippets.

@nunosilva800
Last active September 28, 2017 09:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nunosilva800/e9b919cb8b47e88cd10a to your computer and use it in GitHub Desktop.
Save nunosilva800/e9b919cb8b47e88cd10a to your computer and use it in GitHub Desktop.
echo "* Updating system"
sudo apt-get update
sudo apt-get -y upgrade
echo "* Installing packages"
sudo apt-get -y install build-essential libxml2-dev libxslt1-dev git-core nginx redis-server postgresql-client libpq5 libpq-dev curl nodejs htop
sudo locale-gen pt_PT.UTF-8
sudo dpkg-reconfigure locales
echo "* Installing rvm"
. /etc/profile.d/rvm.sh &> /dev/null
type rvm &> /dev/null
if [ $? -ne 0 ]
then
curl -L https://get.rvm.io | bash -s
echo "source /etc/profile.d/rvm.sh" >> /etc/bash.bashrc
. /etc/profile.d/rvm.sh &> /dev/null
else
echo "* rvm already installed"
fi
cat /etc/environment | grep RAILS_ENV
if [ $? -ne 0 ]
then
echo "RAILS_ENV=production" >> /etc/environment
fi
echo "* Install ruby version 2.2.0"
ruby -v &> /dev/null
if [ $? -ne 0 ]
then
rvm install 2.2.0
else
echo "* Ruby already installed"
fi
@nunosilva800
Copy link
Author

after this, using capistrano:

cap production deploy

setup .env , etc...

cap production puma:nginx_config
cap production puma:config
cap production deploy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment