feat: add support for routing an app to a specified host:port
This is useful when there is a service not managed by Dokku but should be exposed via the Dokku routing layer. As an example, some binaries (consul, nomad, vault) expose web uis, and are traditionally run on the host directly vs in a container. Closes #4665
This commit is contained in:
16
plugins/scheduler-null/commands
Executable file
16
plugins/scheduler-null/commands
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
[[ " help scheduler-null:help " == *" $1 "* ]] || exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
source "$PLUGIN_AVAILABLE_PATH/scheduler-null/help-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
case "$1" in
|
||||
help | scheduler-null:help)
|
||||
cmd-scheduler-null-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
exit "$DOKKU_NOT_IMPLEMENTED_EXIT"
|
||||
;;
|
||||
|
||||
esac
|
||||
23
plugins/scheduler-null/help-functions
Executable file
23
plugins/scheduler-null/help-functions
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
cmd-scheduler-null-help() {
|
||||
declare desc="help command"
|
||||
declare CMD="$1"
|
||||
local plugin_name="scheduler-null"
|
||||
local plugin_description="No-op scheduler plugin"
|
||||
|
||||
if [[ "$CMD" == "${plugin_name}:help" ]]; then
|
||||
echo -e "Usage: dokku ${plugin_name}[:COMMAND]"
|
||||
echo ''
|
||||
echo "$plugin_description"
|
||||
echo ''
|
||||
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
|
||||
true
|
||||
else
|
||||
cat <<help_desc
|
||||
$plugin_name, $plugin_description
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
4
plugins/scheduler-null/plugin.toml
Normal file
4
plugins/scheduler-null/plugin.toml
Normal file
@@ -0,0 +1,4 @@
|
||||
[plugin]
|
||||
description = "dokku core scheduler-null plugin"
|
||||
version = "0.24.10"
|
||||
[plugin.config]
|
||||
17
plugins/scheduler-null/scheduler-is-deployed
Executable file
17
plugins/scheduler-null/scheduler-is-deployed
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
trigger-scheduler-null-scheduler-is-deployed() {
|
||||
declare desc="checks if an app is deployed"
|
||||
declare trigger="scheduler-is-deployed"
|
||||
declare DOKKU_SCHEDULER="$1" APP="$2"
|
||||
|
||||
if [[ "$DOKKU_SCHEDULER" != "null" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
trigger-scheduler-null-scheduler-is-deployed "$@"
|
||||
Reference in New Issue
Block a user