diff --git a/README.md b/README.md index 4a4ab24..c759593 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,25 @@ poetry install pre-commit install ``` +### Run neo4j graph database +We use [neo4j](https://neo4j.com/) for this project to visualise the dependencies between tables. To install neo4j locally using Docker Compose, follow the below instructions: +1. Install Docker + + For Mac OSX, install Docker and Docker Compose together [here](https://docs.docker.com/docker-for-mac/install/). + + For Linux, install Docker [here](https://docs.docker.com/engine/install/) and then follow these [instructions](https://docs.docker.com/compose/install/) to install docker-compose. + + For Windows, install Docker and Docker Compose together [here](https://docs.docker.com/docker-for-windows/install/). +1. Within this directory that has the `docker-compose.yml` file, run the below in your shell/terminal: + ```shell script + docker-compose up -d + ``` +1. If it's the first time you have downloaded the neo4j docker image, wait awhile (maybe an hour, depends on your machine specs). If you have downloaded the neo4j docker image before (such as going through these instructions), then wait a few minutes. Then launch neo4j locally via opening your web browser and entering the following web address: + - http://localhost:7474/browser/ +1. The default username and password will be: + ``` + username: neo4j + password: neo4j + ``` + You can leave the other fields blank. neo4j will then prompt you to change your password. Change it to whatever you please. + *** ## Acknowledgements diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f12c8f4 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,20 @@ +# https://thibaut-deveraux.medium.com/how-to-install-neo4j-with-docker-compose-36e3ba939af0 +version: '3' +services: + neo4j: + image: neo4j:latest + restart: unless-stopped + ports: + - 7474:7474 + - 7687:7687 + volumes: + - ./conf:/conf + - ./data:/data + - ./import:/import + - ./logs:/logs + - ./plugins:/plugins + environment: + # Raise memory limits + - NEO4J_dbms_memory_pagecache_size=2G + - NEO4J_dbms.memory.heap.initial_size=2G + - NEO4J_dbms_memory_heap_max__size=2G