Skip to content

Commit

Permalink
Merge pull request #1 from heddib/bugfix/dokku-scale-file
Browse files Browse the repository at this point in the history
fix: Don't rely on deprecated DOKKU_SCALE file
  • Loading branch information
heddib authored Mar 16, 2022
2 parents 0feacb3 + 858a190 commit c1b120b
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 c1b120b

Please sign in to comment.