From 100c3d68dc4b0f74e8d5633865725425693796ea Mon Sep 17 00:00:00 2001 From: Vaidas Jablonskis Date: Sun, 8 Dec 2013 16:03:46 +0000 Subject: [PATCH] add a simple deploy script It's rather hacky and untested, but should do the job. --- script/deploy.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 script/deploy.sh diff --git a/script/deploy.sh b/script/deploy.sh new file mode 100755 index 0000000..5c4c121 --- /dev/null +++ b/script/deploy.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +server='master0.entrydns.net' + +if [[ $# != 1 ]]; then + echo 'Specify rpm file to deploy' + exit 1 +else: + package=${1} +fi + +scp ${package} ${server}:/tmp + +ssh -t ${server} "sudo yum update -y /tmp/${package}" +ssh -t ${server} "su - entrydns -c 'cd ${HOME} && bundle exec rake db:migrate RAILS_ENV=production'