Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from dokku:master #843

Merged
merged 6 commits into from
Mar 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/advanced-usage/plugin-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
```
plugin:disable <name> # Disable an installed plugin (third-party only)
plugin:enable <name> # Enable a previously disabled plugin
plugin:install [--core|--git-url] [--committish branch|commit|tag] [--name custom-plugin-name] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:install [--core|git-url] [--committish branch|commit|tag] [--name custom-plugin-name] # Optionally download git-url (and pin to the specified branch/commit/tag) & run install trigger for active plugins (or only core ones)
plugin:installed <name> # Checks if a plugin is installed
plugin:install-dependencies [--core] # Run install-dependencies trigger for active plugins (or only core ones)
plugin:list # Print active plugins
Expand Down
30 changes: 29 additions & 1 deletion plugins/builder-pack/builder-build
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,35 @@ trigger-builder-pack-builder-build() {
fi
plugn trigger pre-build "$BUILDER_TYPE" "$APP" "$SOURCECODE_WORK_DIR"

pack build "$IMAGE" --builder "$DOKKU_CNB_BUILDER" --path "$SOURCECODE_WORK_DIR" --default-process web "${ENV_ARGS[@]}"
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" --env=TRACE=true "
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")

DOCKER_ARGS=" $DOCKER_ARGS "
declare -a ARG_ARRAY
eval "ARG_ARRAY=($DOCKER_ARGS)"

eval set -- "$DOCKER_ARGS"

declare -a PACK_ARGS
while true; do
case "$1" in
--volume=* | -v=*)
PACK_ARGS+=("$1")
shift
;;
--volume | -v)
PACK_ARGS+=("--volume")
PACK_ARGS+=("$2")
shift 2
;;
*)
break
;;
esac
done

pack build "$IMAGE" --builder "$DOKKU_CNB_BUILDER" --path "$SOURCECODE_WORK_DIR" --default-process web "${PACK_ARGS[@]}" "${ENV_ARGS[@]}"
docker-image-labeler relabel --label=dokku --label=org.label-schema.schema-version=1.0 --label=org.label-schema.vendor=dokku --label=com.dokku.image-stage=build --label=com.dokku.builder-type=pack --label=com.dokku.app-name=$APP "$IMAGE"

# ensure we have a port mapping
Expand Down
13 changes: 13 additions & 0 deletions plugins/scheduler-docker-local/check-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,19 @@ trigger-scheduler-docker-local-check-deploy() {
ARG_ARRAY+=("$DOKKU_APP_LISTEN_PORT")
fi

local app_vhosts="$(plugn trigger domains-list "$APP")"
if [[ -n "$app_vhosts" ]]; then
for app_vhost in $app_vhosts; do
if [[ "$app_vhost" == "localhost" ]] || [[ "$app_vhost" == '*' ]]; then
continue
fi

ARG_ARRAY+=("--header")
ARG_ARRAY+=("Host: $app_vhost")
break
done
fi

if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then
content="$(docker-container-healthchecker add "$DOKKU_APP_CONTAINER_TYPE" --app-json "$TMP_APP_JSON_OUTPUT" --listening-check --name "port listening check" --port "$DOKKU_APP_LISTEN_PORT" --pretty --warn-only)"
echo "$content" >"$TMP_APP_JSON_OUTPUT"
Expand Down
Loading