Create a .env
file in the project root with the following environment variables:
MG_HOST= # Memgraph host address
MG_PORT= # Default Memgraph port
MG_PORT_ALT= # Alternative port
To enter development mode of the website, with the memgraph database running in the background, run
fastapi dev app/main.py
Once the VM is up and running, SSH into the VM, download and install memgraph
curl -O https://download.memgraph.com/memgraph/v2.14.1/ubuntu-20.04/memgraph_2.14.1-1_amd64.deb
sudo dpkg -i /memgraph_2.14.1-1_amd64.deb
docker build -t research_index_web_app:development .
Run the docker container in development mode to test
docker run -dp 8000:8000 research_index_web_app:development
docker run -dp 5001:80 -w /app -v "$(pwd):/app" research-index-gunicorn-311 sh -c "python app/app.py"
Push container to docker hub
docker container commit c385 ccg-research-index:v0.1
docker image tag ccg-research-index:v0.1 willu47docker/ccg-research-index:ccg-research-index
docker image push willu47docker/ccg-research-index:ccg-research-index