Alzheimer's Knowledgebase (AlzKB) Site
This repository is comprised of the following components:
-
Website: site with some general information about this project. The source code for this website is found in the
app
directory -
Neo4j: used to store the graph database for this Knowledgebase.
-
Nginx: used as a reverse proxy for the Website and the Neo4j Browser
-
Docker Compose files
- The
.yml
files contain definitions for building a docker image.
- The
-
Environmental Variables
- The environmental variables in .env_sample are used by the different docker services.
Installation
Prerequisites
Docker
- Automated Installation
- Run
install-docker.sh
to install Docker Engine
- Run
- Manual Installation
- Install either Docker Desktop or Docker Engine based on your needs.
- Docker Compose
Building and Running
Building and deploying all services
- Get a dump file of the database here and put this file in neo4j/dump/, make sure the filename is alzkb.dump (rename it if necessary)
- Copy the .env_sample as .env and set the variable values as needed for your environment.
- On the very first run, uncomment the lines for the neo4j-admin service in the docker-compose.yml file, after the first run, the neo4j-admin service is not needed.
- To deploy the Website, Neo4j, Nginx and dump the database into neo4j run:
docker compose up -d --build
Building and deploying the services independently
The services can be built independently of each other as needed.
First, copy the .env_sample as .env and update the variable values as needed for your environment.
- Website
- Run
docker compose -f ./app.yml up -d --build
- Run
- Load the database dump
- Ensure that the neo4j docker container is not running, it must be stopped if it is.
- Get a dump file of the database here and put this file in neo4j/dump/, make sure the filename is alzkb.dump (rename it if necessary)
- Run
docker compose -f ./neo4j-admin.yml up -d --build
- Neo4j
- Run
docker compose -f ./neo4j.yml up -d --build
- Run
- Nginx
- Run
docker compose -f ./nginx.yml up -d --build
- Run
Environmental Variables
The .env_sample file contains the following environmental variables:
COMPOSE_PROJECT_NAME
Base name of this project.- See the docker documentation for more details.
ALZKB_HOST
IP address (or URL) of the host server where the Website will be deployed.ALZKB_NEO4J_BROWSER
URL used for the Neo4J Browser, (may be different fromALZKB_HOST
)ALZKB_APP_SERVICE
Name of the docker service where the Website will run. This value is used by Nginx to forward requests to this service.ALZKB_PORT
Port used by ExpressJS to serve the Website, Nginx will forward requests toALZKB_HOST
to this port.ALZKB_DATA_ROOT
Directory where the data from Neo4J will be stored on the host machine (data, logs, etc.)NEO4J_*
variables to configure Neo4j- For more information about these varibales, see the neo4j.conf documenation.
- More details about how these variables map to the neo4j.conf file can be found here
NODE_ENV
Set to either prod or dev- see here for more details.