Sign inSign up

aaxa/gutenberg-neo4j

By aaxa

•Updated over 8 years ago

Image
0

803

aaxa/gutenberg-neo4j repository overview

To run this:

docker run \                                                                                                                                                                                                                  
    -d --name <container-name> \
    --publish=7474:7474 \
    --publish=7687:7687 \
    --volume=$(pwd)/plugins:/plugins \
    --env NEO4J_AUTH=neo4j/class \
    --env=NEO4J_dbms_security_procedures_unrestricted=apoc.\\\*,algo.\\\* \
    --env=NEO4J_dbms_memory_pagecache_size=6G \
    --env=NEO4J_dbms_memory_heap_max__size=6G \
   aaxa/gutenberg-neo4j

To import the data into the database, (the data is already in the container) simply run the following command from your command line:

docker exec neo4j sh -c 'neo4j-admin import \
    --nodes:Author /import/neo-authors.csv --nodes:Book /import/neo-books.csv --nodes:City /import/neo-cities.csv \
    --relationships:WRITTEN_BY /import/neo-books-authors.csv --relationships:CONTAINS /import/neo-books-cities.csv \
    --ignore-missing-nodes=true \
    --ignore-duplicate-nodes=true \
--delimiter "|"'

And then restart your container with docker restart <container name>

Note: If it fails importing your data, delete the folder: /var/lib/neo4j/data/databases/graph.db/ in the container and try to import the data again.

Tag summary

Content type

Image

Digest

Size

347.2 MB

Last updated

over 8 years ago

docker pull aaxa/gutenberg-neo4j