diff --git a/hugegraph-dist/README.md b/hugegraph-dist/README.md index 068bd67590..94493aa928 100644 --- a/hugegraph-dist/README.md +++ b/hugegraph-dist/README.md @@ -27,6 +27,8 @@ If you want to pre-load some data or graphs in container, you can set the env `P If you want to customize the pre-loaded data, please mount the the groovy scripts (not necessary). + + 1. Using docker run Use `docker run -itd --name=graph -p 18080:8080 -e PRELOAD=true -v /yourscript:/hugegraph/scripts/example.groovy hugegraph/hugegraph` to start hugegraph server. @@ -46,4 +48,8 @@ If you want to customize the pre-loaded data, please mount the the groovy script - /path/to/yourscript:/hugegraph/scripts/example.groovy ports: - 18080:8080 - ``` \ No newline at end of file + ``` + +3. Using start-hugegraph.sh + + If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`. \ No newline at end of file diff --git a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh index 1c0110a8b3..d02066141a 100644 --- a/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh +++ b/hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh @@ -23,11 +23,12 @@ GC_OPTION="" USER_OPTION="" SERVER_STARTUP_TIMEOUT_S=30 -while getopts "d:g:m:s:j:t:v" arg; do +while getopts "d:g:m:p:s:j:t:v" arg; do case ${arg} in d) DAEMON="$OPTARG" ;; g) GC_OPTION="$OPTARG" ;; m) OPEN_MONITOR="$OPTARG" ;; + p) PRELOAD="$OPTARG" ;; s) OPEN_SECURITY_CHECK="$OPTARG" ;; j) USER_OPTION="$OPTARG" ;; t) SERVER_STARTUP_TIMEOUT_S="$OPTARG" ;;