Skip to content

Commit

Permalink
[ENH] Replace local graph data with volume
Browse files Browse the repository at this point in the history
Addresses #55
  • Loading branch information
surchs committed May 14, 2024
1 parent 2f64814 commit 59cb11f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ services:
- "local_node_query"
- "full_stack"
volumes:
- "${NB_GRAPH_ROOT_HOST:-~/graphdb-home}:${NB_GRAPH_ROOT_CONT:-/opt/graphdb/home}"
- "graph_data:/opt/graphdb/home"
- "./scripts:/usr/src/neurobagel/scripts"
- ".env:/usr/src/neurobagel/.env"
- "./vocab:/usr/src/neurobagel/vocab"
- "${LOCAL_GRAPH_DATA:-./data}:/data"
ports:
- "${NB_GRAPH_PORT_HOST:-7200}:${NB_GRAPH_PORT:-7200}"
environment:
NB_GRAPH_ROOT_CONT: ${NB_GRAPH_ROOT_CONT:-/opt/graphdb/home}
NB_GRAPH_USERNAME: ${NB_GRAPH_USERNAME}
NB_GRAPH_ADDRESS: ${NB_GRAPH_ADDRESS:-graph}
NB_GRAPH_PORT: ${NB_GRAPH_PORT:-7200}
Expand Down Expand Up @@ -89,4 +88,7 @@ secrets:
db_admin_password:
environment: "NB_GRAPH_ADMIN_PASSWORD"
db_user_password:
environment: "NB_GRAPH_PASSWORD"
environment: "NB_GRAPH_PASSWORD"

volumes:
graph_data:
2 changes: 0 additions & 2 deletions docs/neurobagel_environment_variables.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ Environment variable Set manually in .env? Description Default value if not set
`NB_FAPI_PORT` No Port number on which to run the Neurobagel federation API _in the API container_ `8000` Docker
`NB_GRAPH_IMG` No Graph server Docker image `ontotext/graphdb:10.3.1` Docker
`NB_GRAPH_ADDRESS` No IP address for the graph database (or container name, if graph is hosted locally) `206.12.99.17 (graph)` ** Docker, Python
`NB_GRAPH_ROOT_HOST` No Path to directory on the _host machine_ to store graph database files and data (directory does not have to exist beforehand). `~/graphdb-home` Docker
`NB_GRAPH_ROOT_CONT` No Path to directory for graph databases in the _graph server container_ `/opt/graphdb/home` * Docker
`NB_GRAPH_PORT_HOST` No Port number on the _host machine_ to map the graph server container port to `7200` Docker
`NB_GRAPH_PORT` No Port number used by the _graph server container_ `7200` * Docker, Python
`NB_QUERY_TAG` No Docker image tag for the query tool `latest` Docker
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

/opt/graphdb/dist/bin/graphdb -Dgraphdb.home=${NB_GRAPH_ROOT_CONT} &
/opt/graphdb/dist/bin/graphdb -Dgraphdb.home=/opt/graphdb/home &
GRAPHDB_PID=$!

export NB_GRAPH_ADMIN_PASSWORD=$(cat /run/secrets/db_admin_password)
Expand Down

0 comments on commit 59cb11f

Please sign in to comment.