/poc-neo4j

Primary LanguagePython

PoC Neo4j

Trying out Neo4j with Python

Getting Started

MySQL dump

Copy your SQL dump if you have any.

cp -ip /path/to/your/dump.sql ./mysql/docker-entrypoint-initdb.d

For docker development

Follow this procedure if you are willing to develop in your docker environment.

1. DNS

sudo -- sh -c "echo 127.0.0.1\tmysql >> /etc/hosts"
sudo -- sh -c "echo 127.0.0.1\tneo4j >> /etc/hosts"
sudo killall -HUP mDNSResponder

2. Start (or Restart)

make stop up

3. Stop

make stop

For host development

Follow this procedure if you are willing to develop in your local host environment.

1. Pyenv

After installation/configuration of anyenv:

anyenv install pyenv
pyenv install $(cat ./backend/.python-version)

2. Poetry

Follow the document for poetry to install.

3. Install app

Install required modules for the app.

cd backend
poetry env use $(pyenv which python)
make install

4. Customize your .env

cp -ip ./backend/.env.dev ./backend/.env

5. Start MySQL

make db-up

6. Start app

cd backend
make dev

Access FastAPI docs

http://localhost:8000/docs

Provisioning

1. Configure your .env

Configure your .env to match deployment environment variables.

2. Execute provisioning commands

Graph DB

Execute the command below. (This will take a while...)

cd backend
poetry run provision:graph