Skip to content

Commit 61ee159

Browse files
committed
Use data directory in the scripts
1 parent c0c3a50 commit 61ee159

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

scripts/build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set -x
55

66
source scripts/functions.sh
77

8+
init
89
startZero
910
start
1011

scripts/functions.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,21 @@ function quit {
2626

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

3535
function startZero {
36-
echo -e "Starting dgraph zero.\n"
37-
dgraph zero -w build/wz > build/zero.log --port_offset -2000 2>&1 &
36+
echo -e "Starting Dgraph zero.\n"
37+
dgraph zero -w data/wz --port_offset -2000 > data/zero.log 2>&1 &
3838
# To ensure Dgraph doesn't start before Dgraph zero.
3939
# It takes time for zero to start on travis(mac).
4040
sleep $sleepTime
4141
}
42+
43+
function init {
44+
echo -e "Initializing.\n"
45+
mkdir data
46+
}

0 commit comments

Comments
 (0)