Created
December 3, 2012 01:10
-
-
Save ijin/4191986 to your computer and use it in GitHub Desktop.
upstart script to sync deploy from admin node & restart service
This file contains hidden or 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
description "Update source code" | |
start on filesystem | |
stop on shutdown | |
task | |
console output | |
script | |
time sudo -u deploy rsync -av --delete -e 'ssh -c arcfour -i /home/deploy/.ssh/id_dsa -o StrictHostKeyChecking=no' [email protected]:/usr/local/apps/project/ /usr/local/rails_apps/project >> /mnt/update.log 2>&1 | |
/etc/init.d/unicorn upgrade >> /mnt/update.log 2>&1 | |
/etc/init.d/nginx restart >> /mnt/update.log 2>&1 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment