From b4293909419d6fa2376843e5b70d1588d3ed3e0d Mon Sep 17 00:00:00 2001 From: Yannick Marcon Date: Thu, 9 May 2024 23:13:31 +0200 Subject: [PATCH] fix: set default database name --- bin/first_run.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/first_run.sh b/bin/first_run.sh index f79caf5..6b74bc3 100644 --- a/bin/first_run.sh +++ b/bin/first_run.sh @@ -27,12 +27,17 @@ elif [ -n "$MONGO_HOST" ] then MGP=$MONGO_PORT fi + MGDB=agate + if [ -n "$MONGO_DB" ] + then + MGDB=$MONGO_DB + fi MGURI="$MONGO_HOST:$MGP" if [ -n "$MONGO_USER" ] && [ -n "$MONGO_PASSWORD" ] then - MGURI="$MONGO_USER:$MONGO_PASSWORD@$MGURI/$MONGO_DB?authSource=admin" + MGURI="$MONGO_USER:$MONGO_PASSWORD@$MGURI/$MGDB?authSource=admin" else - MGURI="$MGURI/$MONGO_DB" + MGURI="$MGURI/$MGDB" fi sed s,localhost:27017/agate,$MGURI,g $AGATE_HOME/conf/application.yml > /tmp/application.yml mv -f /tmp/application.yml $AGATE_HOME/conf/application.yml