Neo4j Community edition - how to configure yml to run Docker image via Kitematic CL

162 Views Asked by At

I'm new to Docker and I want to fire up a docker Neo4j Community container that I can connect to (port 7474) and that has the Neo4j data and logs stored outside the container in a folder on my desktop. I'm working on a Windows machine.

I'm trying to save a docker-compose.yml file and fire it from the Kitematic CL with docker-compose up -d

What content should be stored in the yml file? Is there a better/easier way to do this?

neo4j:
   image: official/neo4j:latest
   ports:
    - "7474:7474"
volumes:
   - C:/Users/UserME/Desktop/neo4j/
1

There are 1 best solutions below

0
On

Since all you need is the data to be persisted, I'd recommend a named volume:

volumes:
    neo4j_data: ~

services:
    neo4j:
        image: neo4j:latest
        volumes:
          - neo4j_data:/data