mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
Merge pull request #178 from asm89/redeploy
Redeploy apps on reboot, fixes #82
This commit is contained in:
9
dokku
9
dokku
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user