feat: implement first-pass at networking plugin
Implements help, `rebuild`, and `rebuildall` command. Refs #2403
This commit is contained in:
committed by
Michael Hobbs
parent
8be92d9739
commit
ec9b8be5f8
5
plugins/network/subcommands/default
Executable file
5
plugins/network/subcommands/default
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/network/internal-functions"
|
||||
|
||||
network_help_cmd "network:help"
|
||||
13
plugins/network/subcommands/rebuild
Executable file
13
plugins/network/subcommands/rebuild
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/network/functions"
|
||||
|
||||
network_rebuild_cmd() {
|
||||
declare desc="rebuilds network settings for an app"
|
||||
local cmd="network:rebuild"
|
||||
local APP="$2"
|
||||
|
||||
dokku_write_network_config "$APP"
|
||||
}
|
||||
|
||||
network_rebuild_cmd "$@"
|
||||
14
plugins/network/subcommands/rebuildall
Executable file
14
plugins/network/subcommands/rebuildall
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/network/functions"
|
||||
|
||||
network_rebuildall_cmd() {
|
||||
declare desc="rebuilds network settings for all apps"
|
||||
local cmd="network:rebuildall"
|
||||
for app in $(dokku_apps); do
|
||||
(is_deployed "$app") && dokku_write_network_config "$app"
|
||||
done
|
||||
}
|
||||
|
||||
network_rebuildall_cmd "$@"
|
||||
Reference in New Issue
Block a user