A
A
Alexey Poloz2017-10-23 11:47:06
Python
Alexey Poloz, 2017-10-23 11:47:06

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

2 answer(s)
C
chupasaurus, 2017-10-23
@chupasaurus

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.

P
Philipp, 2017-10-23
@zoonman

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 question

Ask a Question

731 491 924 answers to any question