fix: improved mongo db healthcheck and reduced log verbosity
This commit is contained in:
@@ -40,7 +40,7 @@ MONGO_HOST=mongodb
|
||||
MONGO_PORT=27017
|
||||
MONGO_USER=alfred
|
||||
MONGO_PASSWORD=
|
||||
MONGO_DB_NAME=alfred
|
||||
MONGO_DB_NAME=LibreChat
|
||||
|
||||
# PostgreSQL (Vector Database / RAG)
|
||||
POSTGRES_URI=
|
||||
|
||||
@@ -84,12 +84,11 @@ services:
|
||||
ports:
|
||||
- "${MONGO_PORT}:${MONGO_PORT}"
|
||||
volumes:
|
||||
- ./data/mongo:/data/db
|
||||
command: mongod --quiet --setParameter logComponentVerbosity='{"network":{"verbosity":0}}'
|
||||
- ./data/mongodb:/data/db
|
||||
- ./mongod.conf:/etc/mongod.conf:ro
|
||||
command: ["mongod", "--config", "/etc/mongod.conf"]
|
||||
healthcheck:
|
||||
test: |
|
||||
mongosh --quiet --eval "db.adminCommand('ping')" || \
|
||||
mongosh --quiet -u "${MONGO_USER}" -p "${MONGO_PASSWORD}" --authenticationDatabase admin --eval "db.adminCommand('ping')"
|
||||
test: mongosh --quiet -u "${MONGO_USER}" -p "${MONGO_PASSWORD}" --authenticationDatabase admin --eval "db.adminCommand('ping')"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
49
mongod.conf
Normal file
49
mongod.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
# MongoDB Configuration File
|
||||
|
||||
# Network settings
|
||||
net:
|
||||
port: 27017
|
||||
bindIp: 0.0.0.0
|
||||
|
||||
# Storage settings
|
||||
storage:
|
||||
dbPath: /data/db
|
||||
|
||||
# Security settings
|
||||
security:
|
||||
authorization: enabled
|
||||
|
||||
# System log settings
|
||||
systemLog:
|
||||
destination: file
|
||||
path: /dev/stdout
|
||||
logAppend: false
|
||||
verbosity: 0
|
||||
quiet: true
|
||||
component:
|
||||
accessControl:
|
||||
verbosity: -1
|
||||
command:
|
||||
verbosity: 0
|
||||
control:
|
||||
verbosity: 0
|
||||
ftdc:
|
||||
verbosity: 0
|
||||
geo:
|
||||
verbosity: 0
|
||||
index:
|
||||
verbosity: 0
|
||||
network:
|
||||
verbosity: 0
|
||||
query:
|
||||
verbosity: 0
|
||||
replication:
|
||||
verbosity: 0
|
||||
sharding:
|
||||
verbosity: 0
|
||||
storage:
|
||||
verbosity: 0
|
||||
write:
|
||||
verbosity: 0
|
||||
transaction:
|
||||
verbosity: 0
|
||||
Reference in New Issue
Block a user