You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: hugegraph-server/hugegraph-dist/docker/README.md
+25-14
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,27 @@
1
1
# Deploy Hugegraph server with docker
2
2
3
3
> Note:
4
-
>
5
-
> 1. The docker image of hugegraph is a convenience release, not official distribution artifacts from ASF. You can find more details from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
6
-
>
7
-
> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to experience the newest functions in development.
4
+
>
5
+
> 1. The docker image of hugegraph is a convenience release, not official distribution artifacts
6
+
from ASF. You can find more details
7
+
from [ASF Release Distribution Policy](https://infra.apache.org/release-distribution.html#dockerhub).
8
+
>
9
+
> 2. Recommand to use `release tag`(like `1.2.0`) for the stable version. Use `latest` tag to
10
+
experience the newest functions in development.
8
11
9
12
## 1. Deploy
10
13
11
14
We can use docker to quickly start an inner HugeGraph server with RocksDB in background.
12
15
13
16
1. Using docker run
14
17
15
-
Use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to start hugegraph server.
18
+
Use `docker run -itd --name=graph -p 8080:8080 hugegraph/hugegraph` to start hugegraph server.
16
19
17
20
2. Using docker compose
18
21
19
-
Certainly we can only deploy server without other instance. Additionally, if we want to manage other HugeGraph-related instances with `server` in a single file, we can deploy HugeGraph-related instances via `docker-compose up -d`. The `docker-compose.yaml` is as below:
22
+
Certainly we can only deploy server without other instance. Additionally, if we want to manage
23
+
other HugeGraph-related instances with `server` in a single file, we can deploy HugeGraph-related
24
+
instances via `docker-compose up -d`. The `docker-compose.yaml` is as below:
20
25
21
26
```yaml
22
27
version: '3'
@@ -29,18 +34,22 @@ We can use docker to quickly start an inner HugeGraph server with RocksDB in bac
29
34
30
35
## 2. Create Sample Graph on Server Startup
31
36
32
-
If you want to **pre-load** some (test) data or graphs in container(by default), you can set the env `PRELOAD=ture`
37
+
If you want to **pre-load** some (test) data or graphs in container(by default), you can set the
38
+
env `PRELOAD=ture`
33
39
34
40
If you want to customize the pre-loaded data, please mount the the groovy scripts (not necessary).
35
41
36
42
1. Using docker run
37
43
38
-
Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph`
39
-
to start hugegraph server.
44
+
Use `docker run -itd --name=graph -p 8080:8080 -e PRELOAD=true -v /path/to/yourScript:/hugegraph/scripts/example.groovy hugegraph/hugegraph`
45
+
to start hugegraph server.
40
46
41
-
2. Using docker compose
47
+
2. Using docker compose
42
48
43
-
We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is below. [example.groovy](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/src/assembly/static/scripts/example.groovy) is a pre-defined script. If needed, we can mount a new `example.groovy` to preload different data:
49
+
We can also use `docker-compose up -d` to quickly start. The `docker-compose.yaml` is
is a pre-defined script. If needed, we can mount a new `example.groovy` to preload different
52
+
data:
44
53
45
54
```yaml
46
55
version: '3'
@@ -57,17 +66,19 @@ If you want to customize the pre-loaded data, please mount the the groovy script
57
66
58
67
3. Using start-hugegraph.sh
59
68
60
-
If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like this: `bin/start-hugegraph.sh -p true`.
69
+
If you deploy HugeGraph server without docker, you can also pass arguments using `-p`, like
70
+
this: `bin/start-hugegraph.sh -p true`.
61
71
62
72
## 3. Enable Authentication
63
73
64
74
1. Using docker run
65
75
66
-
Use `docker run -itd --name=graph -p 8080:8080 -e AUTH=true -e PASSWORD=123456 hugegraph/hugegraph` to enable the authentication and set the password with `-e AUTH=true -e PASSWORD=123456`.
76
+
Use `docker run -itd --name=graph -p 8080:8080 -e AUTH=true -e PASSWORD=123456 hugegraph/hugegraph`
77
+
to enable the authentication and set the password with `-e AUTH=true -e PASSWORD=123456`.
67
78
68
79
2. Using docker compose
69
80
70
-
Similarly, we can set the envionment variables in the docker-compose.yaml:
81
+
Similarly, we can set the envionment variables in the docker-compose.yaml:
0 commit comments