Skip to content

Commit 4ae4245

Browse files
committed
If IS_HEROKU variable is set, define NON_PRIVILEGED_USER and uses PORT as web HTTP port
1 parent 2618274 commit 4ae4245

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

nginx/usr/local/share/env/20-heroku

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# If running inside Heroku, exposed port is in `$PORT`
4+
IN_HEROKU="$(convert_to_boolean_string "${IN_HEROKU:-false}")"
5+
if [ "true" = "$IN_HEROKU" ]; then
6+
WEB_HTTPS="false"
7+
WEB_HTTP_PORT=$PORT
8+
9+
export NON_PRIVILEGED_USER="true"
10+
fi
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
3+
# If running inside Heroku, exposed port is in `$PORT`
4+
IN_HEROKU="$(convert_to_boolean_string "${IN_HEROKU:-false}")"
5+
if [ "true" = "$IN_HEROKU" ]; then
6+
WEB_HTTPS="false"
7+
WEB_HTTP_PORT=$PORT
8+
9+
export NON_PRIVILEGED_USER="true"
10+
fi

0 commit comments

Comments
 (0)