Skip to content

Commit 828d585

Browse files
authored
Merge pull request #414 from continuouspipe/feature/uses-herokus-port-and-set-user
Add compatibility to Heroku's Docker runtime
2 parents 2618274 + e46a0e6 commit 828d585

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+
export WEB_HTTPS="false"
7+
export 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+
export WEB_HTTPS="false"
7+
export WEB_HTTP_PORT=$PORT
8+
9+
export NON_PRIVILEGED_USER="true"
10+
fi

0 commit comments

Comments
 (0)