mirror of
https://github.com/dokku/dokku.git
synced 2026-02-24 04:00:36 +01:00
Add post-extract plugin trigger
This trigger allows you to modify the contents of an application *after* it has been extracted from git/tarball but *before* the image source type is detected. For example, you may wish to autogenerate a Dockerfile based on some other application contents before detecting what type of build process - herokuish or docker file - to use.
This commit is contained in:
@@ -481,6 +481,28 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
sudo service haproxy reload
|
||||
```
|
||||
|
||||
### `post-extract`
|
||||
|
||||
- Description: Allows you to modify the contents of an application *after* it has been extracted from git/tarball but *before* the image source type is detected.
|
||||
- Invoked by: `dokku tar:in`, `dokku tar:from` and the `receive-app` plugin trigger
|
||||
- Arguments: `$APP` `$TMP_WORK_DIR` `$REV`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Adds a clock process to an app's Procfile
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
APP="$1"; verify_app_name "$APP"
|
||||
TMP_WORK_DIR="$2"
|
||||
REV="$3" # optional, may not be sent for tar-based builds
|
||||
|
||||
pushd "$TMP_WORK_DIR" > /dev/null
|
||||
touch Procfile
|
||||
echo "clock: some-command" >> Procfile
|
||||
```
|
||||
|
||||
### `post-proxy-ports-update`
|
||||
|
||||
- Description: Allows you to run commands once the proxy port mappings for an application have been updated. It also sends the invoking command. This can be "add", "clear" or "remove".
|
||||
|
||||
Reference in New Issue
Block a user