From 3c520b764332feca305c39a2151cce9b59442b1f Mon Sep 17 00:00:00 2001 From: avisionh Date: Fri, 21 May 2021 16:58:11 +0100 Subject: [PATCH 1/3] feat: Create docker-compose file This is so users can easily run neo4j locally after downloading docker and docker compose. --- docker-compose.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 docker-compose.yml 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 From c146b401ffb2ed795b53846b0ab29d4e0e059efa Mon Sep 17 00:00:00 2001 From: avisionh Date: Fri, 21 May 2021 17:13:29 +0100 Subject: [PATCH 2/3] docs: Instruct settingup neo4j docker image This is so users can run neo4j locally and also help pave the way to deploy onto a server. --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 4a4ab24..18a8ce4 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,20 @@ poetry install pre-commit install ``` +### Run neo4j graph database +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 before launching 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 `neo4j`. You can leave the other fields blank. + *** ## Acknowledgements From fff1f324530d16f9837fb1a83d0ac7b9e452f4b0 Mon Sep 17 00:00:00 2001 From: avisionh Date: Fri, 21 May 2021 17:20:42 +0100 Subject: [PATCH 3/3] docs: Make default username and password more explicit This is so users can easily copy and paste from GitHub. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18a8ce4..c759593 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ pre-commit install ``` ### Run neo4j graph database -To install neo4j locally using Docker Compose, follow the below instructions: +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. @@ -44,9 +44,14 @@ To install neo4j locally using Docker Compose, follow the below instructions: ```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 before launching neo4j locally via opening your web browser and entering the following web address: +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 `neo4j`. You can leave the other fields blank. +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. ***