Skip to content

Commit 363e918

Browse files
committed
Implement new location for nginx conf.
As per #2, due to SE linux breakage. Needs a sudoers entry for mv for this to work.
1 parent ada593d commit 363e918

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

functions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ nginx_stream_build_config() {
5555

5656
echo "-----> Configuring NGINX Stream plugin"
5757
sigil "${SIGIL_PARAMS[@]}" | cat -s >"$STREAM_CONF"
58-
mv "$STREAM_CONF" "$DOKKU_ROOT/$APP/nginx-stream.conf"
58+
mv "$STREAM_CONF" "/etc/nginx/app-stream/$APP.conf"
5959
validate_nginx && restart_nginx >/dev/null
6060
}

install

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ set -eo pipefail
44
[[ $DOKKU_TRACE ]] && set -x
55

66
plugin-install () {
7-
NGINX_CONF="/etc/nginx/nginx.conf"
7+
local NGINX_STREAM_SUDOERS_FILE="/etc/sudoers.d/dokku-nginx-stream"
8+
local NGINX_CONF="/etc/nginx/nginx.conf"
9+
mkdir -p "/etc/nginx/app-stream"
810
cat >> $NGINX_CONF << EOF
911
stream {
10-
include /home/dokku/*/nginx-stream.conf;
12+
include /etc/nginx/app-stream/*.conf;
1113
}
1214
EOF
1315
}
1416

15-
plugin-install "$@"
17+
plugin-install "$@"

0 commit comments

Comments
 (0)