Skip to content

Commit

Permalink
Use data directory in the scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
gpahal committed Dec 13, 2017
1 parent c0c3a50 commit 61ee159
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -x

source scripts/functions.sh

init
startZero
start

Expand Down
11 changes: 8 additions & 3 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@ function quit {

function start {
echo -e "Starting first server."
dgraph server -p build/p -w build/w --memory_mb 4096 --zero localhost:5080 > build/server.log 2>&1 &
dgraph server -p data/p -w data/w --memory_mb 4096 --zero localhost:5080 > data/server.log 2>&1 &
# Wait for membership sync to happen.
sleep $sleepTime
return 0
}

function startZero {
echo -e "Starting dgraph zero.\n"
dgraph zero -w build/wz > build/zero.log --port_offset -2000 2>&1 &
echo -e "Starting Dgraph zero.\n"
dgraph zero -w data/wz --port_offset -2000 > data/zero.log 2>&1 &
# To ensure Dgraph doesn't start before Dgraph zero.
# It takes time for zero to start on travis(mac).
sleep $sleepTime
}

function init {
echo -e "Initializing.\n"
mkdir data
}

0 comments on commit 61ee159

Please sign in to comment.