Skip to content

Commit

Permalink
feat: pre-load some data in container(#840)
Browse files Browse the repository at this point in the history
  • Loading branch information
aroundabout committed Aug 10, 2023
1 parent f69b6e4 commit 4fe1fa0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion hugegraph-dist/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
```
```

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`.
3 changes: 2 additions & 1 deletion hugegraph-dist/src/assembly/static/bin/start-hugegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" ;;
Expand Down

0 comments on commit 4fe1fa0

Please sign in to comment.