add mongo arbiter
This commit is contained in:
parent
f03119cab4
commit
d7e2fcd437
1 changed files with 20 additions and 0 deletions
20
mongo-arbiter/docker-compose.yml
Normal file
20
mongo-arbiter/docker-compose.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
services:
|
||||||
|
mongo-arbiter:
|
||||||
|
# Use the same version as your data nodes!
|
||||||
|
image: mongo:7.0
|
||||||
|
container_name: mongo-arbiter
|
||||||
|
restart: always
|
||||||
|
network_mode: host
|
||||||
|
|
||||||
|
# We pass the specific arbiter flags here
|
||||||
|
command:
|
||||||
|
- mongod
|
||||||
|
- --replSet
|
||||||
|
- rs0
|
||||||
|
- --bind_ip_all
|
||||||
|
- --port
|
||||||
|
- "27017"
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
# Arbiters store very little data, but need a folder
|
||||||
|
- /docker/arbiter/data:/data/db
|
||||||
Loading…
Reference in a new issue