implement ps:restartall. closes #82 #218

This commit is contained in:
Michael Hobbs committed 2015-01-14 16:37:49 -08:00
1 parent 9490889411
commit e760e1cc92
5 files changed
+13 -12

No files matched your search

+2 -1
View File
@@ -4,7 +4,8 @@ Dokku supports rudimentary process (really container) management via the `ps` pl
``` ```
ps <app> List processes running in app container(s) ps <app> List processes running in app container(s)
ps:restart <app> Restart app container(s)
ps:start <app> Start app container(s) ps:start <app> Start app container(s)
ps:stop <app> Stop app container(s) ps:stop <app> Stop app container(s)
ps:restart <app> Restart app container(s)
ps:restartall Restart all deployed app containers
``` ```
+1 -1
View File
@@ -60,7 +60,7 @@ There is an upgrade [script](https://gist.github.com/plietar/7201430), which is
1. run the script as root 1. run the script as root
2. `git pull` to get the latest version of dokku 2. `git pull` to get the latest version of dokku
3. make install 3. make install
4. `dokku deploy:all` 4. `dokku ps:restartall`
TDB. TDB.
-8
View File
@@ -157,14 +157,6 @@ case "$1" in
pluginhook update pluginhook update
;; ;;
# temporary hack for https://github.com/progrium/dokku/issues/82
deploy:all)
for app in $DOKKU_ROOT/*/CONTAINER; do
APP=$(basename "$(dirname $app)");
dokku deploy $APP
done
;;
help|'') help|'')
echo "Usage: dokku COMMAND <app> [command-specific-options]" echo "Usage: dokku COMMAND <app> [command-specific-options]"
echo "" echo ""
+2 -2
View File
@@ -20,7 +20,7 @@ start on (started docker)
script script
sleep 2 # give docker some time sleep 2 # give docker some time
sudo -i -u dokku /usr/local/bin/dokku deploy:all sudo -i -u dokku /usr/local/bin/dokku ps:restartall
end script end script
EOF EOF
;; ;;
@@ -34,7 +34,7 @@ After=docker.target
[Service] [Service]
Type=simple Type=simple
User=dokku User=dokku
ExecStart=/usr/local/bin/dokku deploy:all ExecStart=/usr/local/bin/dokku ps:restartall
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
+8
View File
@@ -66,12 +66,20 @@ case "$1" in
release_and_deploy $APP release_and_deploy $APP
;; ;;
ps:restartall)
for app in $DOKKU_ROOT/*/CONTAINER; do
APP=$(basename "$(dirname $app)");
dokku ps:restart $APP
done
;;
help | ps:help) help | ps:help)
cat && cat<<EOF cat && cat<<EOF
ps <app> List processes running in app container(s) ps <app> List processes running in app container(s)
ps:start <app> Start app container(s) ps:start <app> Start app container(s)
ps:stop <app> Stop app container(s) ps:stop <app> Stop app container(s)
ps:restart <app> Restart app container(s) ps:restart <app> Restart app container(s)
ps:restartall Restart all deployed app containers
EOF EOF
;; ;;