Merge pull request #1610 from kdomanski/post-stop
Add post-stop plugn trigger
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user