Merge pull request #3038 from shrmnk/feature/ps-stopall

Feature: dokku ps:stopall
This commit is contained in:
Jose Diaz-Gonzalez
2018-02-13 01:44:05 -05:00
committed by GitHub
7 changed files with 53 additions and 5 deletions

View File

@@ -14,6 +14,7 @@ ps:scale <app> <proc>=<count> [<proc>=<count>] # Get/Set how many instances of a
ps:set-restart-policy <app> <policy> # Sets app restart-policy
ps:start <app> # Start app container(s)
ps:stop <app> # Stop app container(s)
ps:stopall # Stop all app container(s)
```
By default, Dokku will only start a single `web` process - if defined - though process scaling can be managed by the `ps` plugin or [via a custom `DOKKU_SCALE` file](/docs/deployment/process-management.md#manually-managing-process-scaling).
@@ -99,6 +100,12 @@ Deployed applications can be stopped using the `ps:stop` command. This turns off
dokku ps:stop node-js-app
```
You may also stop all applications at once:
```shell
dokku ps:stopall
```
### Starting applications
All stopped containers can be started using the `ps:start` command. This is similar to running `ps:restart`, except no action will be taken if the application containers are running.

View File

@@ -744,7 +744,7 @@ verify_app_name "$APP"
### `post-stop`
- Description: Can be used to run commands after an application is manually stopped
- Invoked by: `dokku ps:stop`
- Invoked by: `dokku ps:stop` and `dokku ps:stopall`
- Arguments: `$APP`
- Example:

View File

@@ -36,7 +36,7 @@ All applications should be stopped, and all docker containers and images deleted
```shell
# stop all applications
dokku --quiet apps | xargs dokku ps:stop
dokku ps:stopall
# cleanup containers and images
dokku cleanup

View File

@@ -39,9 +39,11 @@ If Dokku was installed via `apt-get install dokku` or `bootstrap.sh` (most commo
sudo apt-get update
# stop each running app
# for 0.8.1 and newer versions, use
# for 0.11.4 and newer versions, use
dokku ps:stopall
# for versions between 0.8.1 and 0.11.3, use
dokku --quiet apps:list | xargs -L1 dokku ps:stop
# for older versions, use
# for versions versions older than 0.8.1, use
dokku --quiet apps | xargs -L1 dokku ps:stop
# update dokku and it's dependencies