Last active
February 15, 2017 23:22
-
-
Save devigned/528f8e9034def7280f52a1fffd6953c3 to your computer and use it in GitHub Desktop.
Initial Capistrano deploy (rails, nginx, puma)
This file contains 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
# commit all of our changes and push them to the Github | |
git add . | |
git commit -am 'my first deploy' | |
git push origin master | |
# show what keys have been added to the ssh-agent (not needed, but helpful if debugging) | |
# ssh-add -l | |
# ensure you have added the id_rsa identity to your ssh agent | |
ssh-add ~/.ssh/id_rsa | |
# perform our initial deployment | |
cap production deploy | |
# SSH into the Azure VM | |
ssh deploy@${publicIpAddress} | |
### TO BE EXECUTED ON THE AZURE VM ### | |
sudo rm /etc/nginx/sites-enabled/default | |
# symlink our application nginx configuration | |
sudo ln -nfs /home/deploy/apps/level0/current/config/nginx.conf \ | |
/etc/nginx/sites-enabled/level0 | |
# restart nginx | |
sudo service nginx restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment