Skip to content

Commit

Permalink
fix: set default database name
Browse files Browse the repository at this point in the history
  • Loading branch information
ymarcon committed May 9, 2024
1 parent 4b34119 commit b429390
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/first_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b429390

Please sign in to comment.