Singleton mongo client, added mongosh easy enter command, better logging, added idle time to mongo connection

This commit is contained in:
miloszowi
2021-10-13 18:40:24 +02:00
parent ea2fddff40
commit 9c8f5795f8
7 changed files with 45 additions and 24 deletions

8
docker/mongosh Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
if [ -f docker/config/app.env ]
then
source docker/config/app.env
fi
docker-compose exec database mongosh --port $MONGODB_PORT --host $MONGODB_HOSTNAME --username $MONGODB_USERNAME --password $MONGODB_PASSWORD --authenticationDatabase admin $MONGODB_DATABASE

5
docker/start Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
docker-compose stop
docker-compose up -d
docker logs -f $(docker-compose ps -q app) &> app.log &