常用docker-compose.yml配置
记录一些常用的docker-composer.yml
配置文件
- mongo
1
2
3
4
5
6
7
8
9
10
11
12
13
14version: '3'
services:
mongodb:
image: mongo
container_name: mongo_test
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
volumes:
- /home/sun/mongotest/db:/data/db
- /home/sun/mongotest/log:/var/log/mongodb
ports:
- 27017:27017
restart: always
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 Bolg!