Skip to content

Instantly share code, notes, and snippets.

@devigned
Last active February 15, 2017 23:22
Show Gist options
  • Save devigned/528f8e9034def7280f52a1fffd6953c3 to your computer and use it in GitHub Desktop.
Save devigned/528f8e9034def7280f52a1fffd6953c3 to your computer and use it in GitHub Desktop.
Initial Capistrano deploy (rails, nginx, puma)
# 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