Merge pull request #2850 from dokku/mh/chore/optional-docker-args-deploy

add optional PROC_TYPE and CONTAINER_INDEX to docker-args-deploy plugn trigger
This commit is contained in:
Michael Hobbs
2017-07-26 10:36:02 -07:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -215,6 +215,7 @@ Note: The following plugins have been supplied by our community and may not have
| [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ | | [Docker auto persist volumes](https://github.com/Flink/dokku-docker-auto-volumes) | [Flink][] | 0.4.0+ |
| [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ | | [Hostname](https://github.com/michaelshobbs/dokku-hostname) | [michaelshobbs][] | 0.4.0+ |
| [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ | | [Logspout](https://github.com/michaelshobbs/dokku-logspout) | [michaelshobbs][] | 0.4.0+ |
| [Syslog](https://github.com/michaelshobbs/dokku-syslog) | [michaelshobbs][] | 0.10.4+ |
| [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ | | [Long Timeout](https://github.com/investtools/dokku-long-timeout-plugin) | [investtools][] | 0.4.0+ |
| [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x | | [Monit](https://github.com/cjblomqvist/dokku-monit) | [cjblomqvist][] | 0.3.x |
| [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ | | [Monorepo](https://github.com/iamale/dokku-monorepo) | [iamale][] | 0.4.0+ |

View File

@@ -259,7 +259,7 @@ cache-bust-build-arg "$@"
- Description: - Description:
- Invoked by: `dokku deploy` - Invoked by: `dokku deploy`
- Arguments: `$APP $IMAGE_TAG` - Arguments: `$APP $IMAGE_TAG [$PROC_TYPE $CONTAINER_INDEX]`
- Example: - Example:
```shell ```shell

View File

@@ -541,7 +541,6 @@ dokku_deploy_cmd() {
local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE" local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
local oldids=$(get_app_container_ids "$APP") local oldids=$(get_app_container_ids "$APP")
local DOKKU_DEFAULT_DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
local DOKKU_IS_APP_PROXY_ENABLED="$(is_app_proxy_enabled "$APP")" local DOKKU_IS_APP_PROXY_ENABLED="$(is_app_proxy_enabled "$APP")"
local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)" local DOKKU_DOCKER_STOP_TIMEOUT="$(config_get "$APP" DOKKU_DOCKER_STOP_TIMEOUT || true)"
[[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}" [[ $DOKKU_DOCKER_STOP_TIMEOUT ]] && DOCKER_STOP_TIME_ARG="--time=${DOKKU_DOCKER_STOP_TIMEOUT}"
@@ -573,9 +572,10 @@ dokku_deploy_cmd() {
local DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_TYPE.$CONTAINER_INDEX" local DOKKU_PORT_FILE="$DOKKU_ROOT/$APP/PORT.$PROC_TYPE.$CONTAINER_INDEX"
# start the app # start the app
local DOCKER_ARGS="$DOKKU_DEFAULT_DOCKER_ARGS" local DOCKER_ARGS
local DOCKER_ARGS+=" -e DYNO=$PROC_TYPE.$CONTAINER_INDEX " DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG" "$PROC_TYPE" "$CONTAINER_INDEX")
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true " DOCKER_ARGS+=" -e DYNO=$PROC_TYPE.$CONTAINER_INDEX "
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
[[ -n "$DOKKU_HEROKUISH" ]] && local START_CMD="/start $PROC_TYPE" [[ -n "$DOKKU_HEROKUISH" ]] && local START_CMD="/start $PROC_TYPE"