mirror of
https://github.com/vbatts/imgsrv.git
synced 2024-11-23 08:35:43 +00:00
run.sh: allow for additional args through env variable
"what could possibly go wrong" But since changing the cmd through openshift is not straight forward, this allows me to inject additional parameters to the app. Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
3388ff82f2
commit
00628d75f5
1 changed files with 5 additions and 5 deletions
10
run.sh
10
run.sh
|
@ -4,13 +4,13 @@ binary=${APP_BINARY:-/usr/local/bin/imgsrv}
|
||||||
MONGODB_SERVICE_HOST=${MONGODB_SERVICE_HOST:-localhost}
|
MONGODB_SERVICE_HOST=${MONGODB_SERVICE_HOST:-localhost}
|
||||||
MONGODB_SERVICE_PORT=${MONGODB_SERVICE_PORT:-27017}
|
MONGODB_SERVICE_PORT=${MONGODB_SERVICE_PORT:-27017}
|
||||||
|
|
||||||
args=""
|
args=${ARGS:-""}
|
||||||
if [ ! -z "${DATABASE_USER}" ] ; then
|
if [ ! -z "${MONGODB_USER}" ] ; then
|
||||||
args=" ${args} -mongo-username=$DATABASE_USER "
|
args=" ${args} -mongo-username=$MONGODB_USER "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "${DATABASE_PASSWORD}" ] ; then
|
if [ ! -z "${MONGODB_PASSWORD}" ] ; then
|
||||||
args=" ${args} -mongo-password=$DATABASE_PASSWORD "
|
args=" ${args} -mongo-password=$MONGODB_PASSWORD "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! echo "${1:-$@}" | grep -q '\-mongo-host' ; then
|
if ! echo "${1:-$@}" | grep -q '\-mongo-host' ; then
|
||||||
|
|
Loading…
Reference in a new issue