-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapping an existing local neo4j database to a neo4j docker container [OSX] #66
Comments
It looks like you a trying to pass the wrong directory to the container. You want to pass the raw To illustrate, this is the default structure of the
So whatever you mount as the |
Thanks for the quick and detailed reply! So I have two neo4j data sets on my machine, This is the top level directory structure of the one I'm trying to include in the neo4j container (epe.graphdb):
When looking at the structure of epe.graphdb, the /data directory seems to be more complicated than the one you described (limited to three levels deep for readability):
So my question would be, should I be referencing Hope that makes sense, Thanks again! |
You have some nested databases there due to mounting the wrong If you want to mount NOTE: The directory structure changed in Neo4j 3.0 and that is Easy and safe wayCurrently you have:
The easiest way to mount that in docker is to do: mkdir -p /User/testuser/Documents/Neo4j/databases
mv /User/testuser/Documents/Neo4j/epe.graphdb /User/testuser/Documents/Neo4j/databases/graph.db And then you'd specify this in your compose file: volumes:
- /User/testuser/Documents/Neo4j:/data Note that I renamed the database to avoid having to specify a full Advanced and dangerous wayThere is nothing magic going on here, so you can in fact mount your Your compose file just needs to specify: volumes:
- /User/testuser/Documents/Neo4j/epe.graphdb:/data/databases/graph.db This mounts your local database named |
Fantastic!! That worked like a charm, I'm very grateful for your help 👍 If we ever cross paths, coffees/beers are on me! |
I seem to be having troubles mapping a local database to the docker container. I have exhausted google and stackoverflow after hours of search and still can't get it working. Im wondering if there's an issue or am I just barking up the wrong tree.
Here is my docker-compose.yml:
When using the desktop application for neo4j, setting the database location to the following works perfect and I can browse the data. But the browser within the docker container returns no data.
/User/testuser/Documents/Neo4j/epe.graphdb
Sorry if this is just me being stupid, close if this is the case.
The text was updated successfully, but these errors were encountered: