加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
mongo-rep-set.yml 901 Bytes
一键复制 编辑 原始数据 按行查看 历史
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
MONGO_INITDB_DATABASE: blog
volumes:
- ./mongo-initdb.d:/docker-entrypoint-initdb.d
ports:
- "27017:27017"
restart: always
command: --bind_ip_all --replSet rs0
mongo2:
hostname: mongo2
container_name: localmongo2
image: mongo:4.0-xenial
ports:
- "27018:27017"
restart: always
command: --bind_ip_all --replSet rs0
mongo3:
hostname: mongo3
container_name: localmongo3
image: mongo:4.0-xenial
ports:
- "27019:27017"
restart: always
command: --bind_ip_all --replSet rs0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化