Skip to content

Commit

Permalink
fix: Don't rely on deprecated DOKKU_SCALE file
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrnld committed Nov 24, 2021
1 parent 0feacb3 commit 858a190
Showing 1 changed file with 1 addition and 2 deletions.
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

0 comments on commit 858a190

Please sign in to comment.