提交 4fbe7f71 authored 作者: 陈欢's avatar 陈欢

fix: mongodb配置

上级 4b143d4b
...@@ -11,4 +11,4 @@ services: ...@@ -11,4 +11,4 @@ services:
- ./data/db:/data/db # 挂载数据目录 - ./data/db:/data/db # 挂载数据目录
- ./data/log:/var/log/mongodb # 挂载日志目录 - ./data/log:/var/log/mongodb # 挂载日志目录
- ./data/config:/etc/mongo # 挂载配置目录 - ./data/config:/etc/mongo # 挂载配置目录
# command: --config /docker/mongodb/mongod.conf # 配置文件 command: --config mongod.conf # 配置文件
# for documentation of all options, see: ## content
# http://docs.mongodb.org/manual/reference/configuration-options/ systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Where and how to store data. # Where and how to store data.
storage: storage:
dbPath: /data/db dbPath: /data/db
journal:
enabled: true
directoryPerDB: true directoryPerDB: true
engine: wiredTiger
wiredTiger:
engineConfig:
cacheSizeGB: 8
directoryForIndexes: true
# where to write logging data. journal:
systemLog: enabled: true
destination: file # how the process runs
logAppend: true processManagement:
path: /var/log/mongodb/mongod.log fork: true
pidFilePath: /var/log/mongodb/configsvr.pid
# network interfaces # network interfaces
net: net:
port: 27017 port: 27017
bindIp: 0.0.0.0 bindIp: 0.0.0.0
# how the process runs #operationProfiling:
processManagement:
timeZoneInfo: /usr/share/zoneinfo
#replication: #replication:
replication: # replSetName: bt_main
oplogSizeMB: 51200 security:
replSetName: rs0 #authorization: disabled
authorization: enabled
javascriptEnabled: false
#sharding:
# clusterRole: shardsvr
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论