Skip to content

Instantly share code, notes, and snippets.

@epishan
epishan / deploy.sh
Created January 22, 2014 15:41 — forked from tokudu/deploy.sh
http://blog.umanoapp.com/post/35685965949/writing-a-simple-deployment-script-for-your-ec2-servers If your backend is running on the Amazon Web Services EC2 stack, you always have to deal with deploying the latest version of your code to all of your instances. The archaic way of doing this is SSH’ing into every instance, manually pulling the late…
#!/bin/bash
# Updates all EC2 instances from git
# Author: anton@sothree.com
CODE_LOCATION=/var/www/your_project
SERVER_PREFIX=your_project
# exit if something fails
set -e