Answer the question
In order to leave comments, you need to log in
Python MongoDB Is it possible to attach to a local file in a project folder?
Is it possible to create a database file inside a project folder?
for purely local use
If yes, how and how to connect to it, start the server?
Answer the question
In order to leave comments, you need to log in
You can use mongoexport/mongodump, the output of the former does not support all data types.
In general, make a Docker container with the necessary data and don't rack your brains.
Just creating a local file will not work, MongoDB is not SQLite, it has a lot of files.
It makes the most sense to use an external folder for the Docker container .
But nothing prevents you from running MongoDB with an external configuration file that contains the path to its folder .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question