提交 2159e085 authored 作者: 陈欢's avatar 陈欢

fix

上级 4fbe7f71
WORKDIR /mongo
ADD ./bin /mongo/bin
ADD ./data /mongo/data
ADD ./log /mongo/log
ADD ./mongod.conf /mongo/mongod.conf
ENTRYPOINT ["./bin/mongod","-f","config.conf",">","./log.txt 2>&1","&"]
\ No newline at end of file
差异被折叠。
差异被折叠。
MongoDB README
Welcome to MongoDB!
COMPONENTS
mongod - The database server.
mongos - Sharding router.
mongo - The database shell (uses interactive javascript).
UTILITIES
install_compass - Installs MongoDB Compass for your platform.
BUILDING
See docs/building.md.
RUNNING
For command line options invoke:
$ ./mongod --help
To run a single server database:
$ sudo mkdir -p /data/db
$ ./mongod
$
$ # The mongo javascript shell connects to localhost and test database by default:
$ ./mongo
> help
INSTALLING COMPASS
You can install compass using the install_compass script packaged with MongoDB:
$ ./install_compass
This will download the appropriate MongoDB Compass package for your platform
and install it.
DRIVERS
Client drivers for most programming languages are available at
https://docs.mongodb.com/manual/applications/drivers/. Use the shell
("mongo") for administrative tasks.
BUG REPORTS
See https://github.com/mongodb/mongo/wiki/Submit-Bug-Reports.
PACKAGING
Packages are created dynamically by the package.py script located in the
buildscripts directory. This will generate RPM and Debian packages.
DOCUMENTATION
https://docs.mongodb.com/manual/
CLOUD HOSTED MONGODB
https://www.mongodb.com/cloud/atlas
FORUMS
https://community.mongodb.com
A forum for technical questions about using MongoDB.
https://community.mongodb.com/c/server-dev
A forum for technical questions about building and developing MongoDB.
LEARN MONGODB
https://university.mongodb.com/
LICENSE
MongoDB is free and open-source. Versions released prior to October 16,
2018 are published under the AGPL. All versions released after October
16, 2018, including patch fixes for prior versions, are published under
the Server Side Public License (SSPL) v1. See individual files for
details.
差异被折叠。
差异被折叠。
# 该Yaml文件改编自DockerHub中的配置文件
version: '3.8'
services:
mongo:
restart: always
ports:
- 27016:27017 #对外暴露停供服务的端口,正式生产的时候理论不用暴露。
volumes:
- ./data:/data/db # 挂载数据目录
- ./log:/var/log/mongodb # 挂载日志目录
command: --config mongod.conf # 配置文件
## content
systemLog:
destination: file
logAppend: true
path: /mongo/log/mongod.log
# Where and how to store data.
storage:
dbPath: /mongo/data
directoryPerDB: true
journal:
enabled: true
# how the process runs
processManagement:
fork: true
pidFilePath: /mongo/configsvr.pid
# network interfaces
net:
port: 27017
bindIp: 0.0.0.0
#operationProfiling:
#replication:
# replSetName: bt_main
security:
#authorization: disabled
authorization: enabled
javascriptEnabled: false
#sharding:
# clusterRole: shardsvr
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论