Uploaded by ajay L

How to turn standalone MongoDB server into a replica set with Docker-Compose Change

advertisement
How to turn standalone MongoDB server into a replica set with Docke...
1 of 1
https://zgadzaj.com/development/docker/docker-compose/turning-stand...
DOCKER COMPOSE
How to turn standalone
MongoDB server into a replica
set with Docker-Compose
How to setup and deploy a MongoDB replica set with Docker?
How do I start a replica set of MongoDB in Docker?
How to automatically initiate MongoDB replica set in DockerCompose container?
docker-compose.yml
Original standalone configuration
Related: MongoDB
container with Docker
Compose
// docker-compose.yml
version: '3'
In this post:
docker-compose.yml:
- original config
- new replica set
config
- what has changed
.env.dist
Final result
services:
...
mongodb:
build: .docker
04/04/23, 8:48 PM
Download