Files
dokku/plugins/nginx-vhosts/subcommands/build-config
T
Jose Diaz-Gonzalez 86795ddacc tests: run mvdan/shfmt on test runs
While I do not agree with _every_ style change, this will force Dokku to have consistent formatting across all shell scripts, which is arguably a Good Thing™.

The command used to reprocess everything is:

```shell
shfmt -l -bn -ci -i 2 -w .
```
2019-01-07 01:25:55 -05:00

23 lines
683 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
nginx_build_config_cmd() {
declare desc="build nginx config to proxy app containers from command line"
declare APP="$2"
local cmd="nginx:build-config"
[[ -z "$APP" ]] && dokku_log_fail "Please specify an app to run the command on"
local PROXY_APP_TYPE
PROXY_APP_TYPE="$(get_app_proxy_type "$APP")"
if [[ "$PROXY_APP_TYPE" == "nginx" ]]; then
plugn trigger proxy-build-config "$APP"
else
dokku_log_fail "Configured proxy for ${APP} is ${PROXY_APP_TYPE}"
fi
}
nginx_build_config_cmd "$@"