Merge pull request #1610 from kdomanski/post-stop

Add post-stop plugn trigger
This commit is contained in:
Jose Diaz-Gonzalez
2015-10-26 13:54:21 -04:00
2 changed files with 19 additions and 0 deletions

View File

@@ -437,6 +437,24 @@ APP="$1";
dokku postgres:destroy $APP
```
### `post-stop`
- Description: Can be used to run commands after an application is manually stopped
- Invoked by: `dokku ps:stop`
- Arguments: `$APP`
- Example:
```shell
#!/usr/bin/env bash
# Marks an application as manually stopped
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
APP="$1";
dokku config:set --no-restart $APP MANUALLY_STOPPED=1
```
### `docker-args-build`
- Description:

View File

@@ -41,6 +41,7 @@ case "$1" in
if [[ -n "$DOKKU_APP_RUNNING_CONTAINER_IDS" ]]; then
echo "Stopping $APP ..."
docker stop $DOKKU_APP_RUNNING_CONTAINER_IDS > /dev/null || true
plugn trigger post-stop $APP
else
echo "App $APP already stopped"
fi