Redeploy apps on reboot, fixes #82

This commit is contained in:
Alexander
2013-08-16 22:56:57 +02:00
parent 84cf39bf09
commit 53395bfa08
2 changed files with 25 additions and 1 deletions

9
dokku
View File

@@ -77,6 +77,15 @@ case "$1" in
pluginhook install
;;
# temporary hack for https://github.com/progrium/dokku/issues/82
deploy:all)
for app in $(ls -d $HOME/*/); do
APP=$(basename $app);
IMAGE="app/$APP"
dokku deploy $APP $IMAGE
done
;;
help)
cat<<EOF | pluginhook commands help | sort
help Print the list of commands

View File

@@ -2,4 +2,19 @@
sed -i 's/docker -d$/docker -d -r=true/' /etc/init/docker.conf
echo $HOSTNAME > /home/git/HOSTNAME
echo $HOSTNAME > /home/git/HOSTNAME
# temporary hack for https://github.com/progrium/dokku/issues/82
# redeploys all apps after a reboot
cat<<EOF > /etc/init/dokku-redeploy.conf
description "Dokku app redeploy service"
start on (started docker)
script
sleep 2 # give docker some time
sudo -i -u git /usr/local/bin/dokku deploy:all
end script
EOF