forked from phyloviz/phyloDB
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch-docker.sh
executable file
·30 lines (19 loc) · 951 Bytes
/
launch-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Move into current script's directory.
PROJ_ROOT="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"
pushd "$PROJ_ROOT" # cd current directory
newgrp docker
cd "instance1"
#USER=$(id -u):$(id -g) DB_PATH=$HOME/instance1/db APP_PATH=$HOME/instance1/app docker-compose up -d
USER=$(id -u):$(id -g) DB_PATH=$PROJ_ROOT/instance1/db APP_PATH=$PROJ_ROOT/instance1/app docker-compose up -d
# Create a session within the running Docker container.
#docker exec -ti phylodb-sourcegit_db_1 sh -c "cypher-shell -u neo4j -p password"
SCHEMA_QUERY_FILE="$PROJ_ROOT/scripts/init/init_schema.cypher"
#docker exec -ti phylodb-sourcegit_db_1 sh -c "cypher-shell -u neo4j -p password < $(cat $SCHEMA_QUERY_FILE)"
# Create admin user in Neo4j.
#TODO: run the .cypher file from this script using docker exec.
# Insert some data in Neo4j.
#TODO: run the .cypher file from this script using docker exec.
# Change back to original group ID.
newgrp
popd