“Docker mongo”的版本间的差异
跳到导航
跳到搜索
第60行: | 第60行: | ||
[http://sillycat.iteye.com/blog/2320436 MongoDB Docker and Raspberry Pi] | [http://sillycat.iteye.com/blog/2320436 MongoDB Docker and Raspberry Pi] | ||
+ | |||
+ | [[category:nosql]] [[category:devops]] |
2021年9月23日 (四) 01:12的版本
cat docker-compose.yml version: "3" services: mongodb: image: mongo:4.2 container_name: mongodb4.2 ports: - "27017-27019:27017-27019" volumes: # - /Users/Pie/docker-lnmp/conf/mongodb/:/etc/mongo/:rw - /data/db_data/mongodb/:/data/db/:rw - /data/log/mongodb/:/var/log/mongodb/:rw environment: #设置后台登录用户和密码,没设置默认为:guest/guest MONGO_INITDB_ROOT_USERNAME: "root" MONGO_INITDB_ROOT_PASSWORD: example36 TZ: "Asia/Shanghai" restart: always networks: - default