diff --git a/neo4j/README.md b/neo4j/README.md index 995bc3a..c0251d7 100644 --- a/neo4j/README.md +++ b/neo4j/README.md @@ -5,28 +5,9 @@ neo4j relationships as first-class entities, helping enterprises build intelligent applications to meet today’s evolving data challenges. -## docker-compose - -```yaml -neo4j: - image: neo4j - ports: - - "7474:7474" - - "7687:7687" - volumes: - - ./data:/data - environment: - - NEO4J_CACHE_MEMORY=4G - ulimits: - nofile: - soft: 65535 - hard: 65535 - restart: always -``` - ## up and running -``` +```bash $ docker-compose up -d $ docker-compose exec neo4j bin/neo4j-shell @@ -37,6 +18,8 @@ $ docker-compose exec neo4j bin/neo4j-shell >>> create (p:Person {id: {person_id}}) return p; >>> match (p:Person {id: {person_id}}) return p; >>> exit + +$ curl http://localhost:7474/browser/ ``` [1]: http://neo4j.com/ diff --git a/neo4j/docker-compose.yml b/neo4j/docker-compose.yml index b211e17..c7b38ad 100644 --- a/neo4j/docker-compose.yml +++ b/neo4j/docker-compose.yml @@ -1,14 +1,30 @@ -neo4j: - image: neo4j - ports: - - "7474:7474" - - "7687:7687" - volumes: - - ./data:/data - environment: - - NEO4J_CACHE_MEMORY=4G - ulimits: - nofile: - soft: 65535 - hard: 65535 - restart: always +# +# References: +# - https://neo4j.com/docs/operations-manual/current/docker/ +# - https://neo4j.com/docs/operations-manual/current/docker/ref-settings/ +# - https://neo4j.com/docs/operations-manual/current/reference/configuration-settings/ +# + +version: "3.8" +services: + neo4j: + image: neo4j + ports: + - "7474:7474" + - "7687:7687" + volumes: + - ./data/conf:/conf + - ./data/data:/data + - ./data/import:/import + - ./data/logs:/logs + - ./data/plugins:/plugins + environment: + - NEO4J_AUTH=none + - NEO4J_dbms.memory.heap.initial_size=5g + - NEO4J_dbms_memory_heap_max__size=5g + - NEO4J_dbms_memory_pagecache_size=7g + ulimits: + nofile: + soft: 65535 + hard: 65535 + restart: unless-stopped