Prerequisite:
- Docker Engine
- Docker Compose
Preparing your docker-compose.yml
script
services:
neo4j:
container_name: neo4j
image: neo4j:latest
ports:
- 7474:7474
- 7687:7687
environment:
- NEO4J_AUTH=neo4j/${NEO4J_PASSWORD}
- NEO4J_apoc_export_file_enabled=true
- NEO4J_apoc_import_file_enabled=true
- NEO4J_apoc_import_file_use__neo4j__config=true
- NEO4J_PLUGINS=["apoc", "graph-data-science"]
volumes:
- ./neo4j_db/data:/data
- ./neo4j_db/logs:/logs
- ./neo4j_db/import:/var/lib/neo4j/import
- ./neo4j_db/plugins:/plugins
The variable ${NEO4J_PASSWORD} will be loaded from environment variable only if its set, otherwise te default password = ‘password’ will be used.
Start with docker-compose up -d
command
The neo4j database UI would be up and running at http://localhost:7474
Your Neo4j server is up and running at port 7687
The deafult username and password for the server is
username : neo4j
password : password
I will be soon writing a blog on how to load neo4j with your data. Stay tuned! 🙂