1
0
Fork 0
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:
Vincent Batts 2017-06-08 14:52:25 -04:00
parent 3388ff82f2
commit 00628d75f5
Signed by: vbatts
GPG key ID: 10937E57733F1362

10
run.sh
View file

@ -4,13 +4,13 @@ binary=${APP_BINARY:-/usr/local/bin/imgsrv}
MONGODB_SERVICE_HOST=${MONGODB_SERVICE_HOST:-localhost}
MONGODB_SERVICE_PORT=${MONGODB_SERVICE_PORT:-27017}
args=""
if [ ! -z "${DATABASE_USER}" ] ; then
args=" ${args} -mongo-username=$DATABASE_USER "
args=${ARGS:-""}
if [ ! -z "${MONGODB_USER}" ] ; then
args=" ${args} -mongo-username=$MONGODB_USER "
fi
if [ ! -z "${DATABASE_PASSWORD}" ] ; then
args=" ${args} -mongo-password=$DATABASE_PASSWORD "
if [ ! -z "${MONGODB_PASSWORD}" ] ; then
args=" ${args} -mongo-password=$MONGODB_PASSWORD "
fi
if ! echo "${1:-$@}" | grep -q '\-mongo-host' ; then