Skip to content

Fix bugs and enhance Docker setup for MongoDB#20

Open
SaiTeja-Murari wants to merge 5 commits intoshradha-khapra:mainfrom
SaiTeja-Murari:main
Open

Fix bugs and enhance Docker setup for MongoDB#20
SaiTeja-Murari wants to merge 5 commits intoshradha-khapra:mainfrom
SaiTeja-Murari:main

Conversation

@SaiTeja-Murari
Copy link
Copy Markdown

Summary
This PR updates the Docker configuration to add a persistent volume for MongoDB. The change ensures that database data is preserved even if the Mongo container stops or is recreated.

Changes Made

  • Added a Docker volume (mongo-data) to the MongoDB service.
  • Mounted the volume to /data/db inside the container.
  • Updated docker-compose.yml to include the volume configuration.

Why This Change Was Needed
Previously, MongoDB data was stored inside the container filesystem. When the container stopped or was removed, all database data was lost. Using a Docker volume allows the database to persist across container restarts and recreations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant