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

fix: Don't rely on deprecated DOKKU_SCALE file #1

Merged
merged 1 commit into from
Mar 16, 2022
Merged
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
3 changes: 1 addition & 2 deletions functions
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ nginx_stream_build_config() {
UDP_PROXY_PORT_MAP="$UDP_PROXY_PORT_MAP"
UDP_PROXY_UPSTREAM_PORTS="$UDP_PROXY_UPSTREAM_PORTS")

local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
while read -r line || [[ -n "$line" ]]; do
[[ "$line" =~ ^#.* ]] && continue
line="$(strip_inline_comments "$line")"
Expand All @@ -76,7 +75,7 @@ nginx_stream_build_config() {
UPP_PROC_TYPE="${PROC_TYPE^^}"
UPP_PROC_TYPE="${UPP_PROC_TYPE//-/_}"
SIGIL_PARAMS+=( "DOKKU_APP_${UPP_PROC_TYPE}_LISTENERS=$LISTENERS" )
done <"$DOKKU_SCALE_FILE"
done < <(plugn trigger ps-current-scale "$APP")

sigil "${SIGIL_PARAMS[@]}" | cat -s >"$STREAM_CONF"
sudo /bin/mv "$STREAM_CONF" "/etc/nginx/app-stream/$APP.conf"
Expand Down