Dgraph is an open source, scalable, distributed, highly available and fast graph database, designed from ground up to be run in production. ------来自dgraph官网
以下是dgraph相关的资料链接。
1. dgraph官网
2. dgraph官方使用文档
1. Mac上 安装docker
brew cask install docker
2. 获取dgraph镜像
docker pull dgraph/dgraph
3. dgraph启动
复制以下内容,到一个文件夹里面创建文件 docker-compose.yml。参考 https://docs.dgraph.io/get-started/#step-1-install-dgraph
version: "3.2"
services:
zero:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 5080:5080
- 6080:6080
restart: on-failure
command: dgraph zero --my=zero:5080
server:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 8080:8080
- 9080:9080
restart: on-failure
command: dgraph alpha --my=server:7080 --lru_mb=2048 --zero=zero:5080
ratel:
image: dgraph/dgraph:latest
volumes:
- type: volume
source: dgraph
target: /dgraph
volume:
nocopy: true
ports:
- 8000:8000
command: dgraph-ratel
volumes:
dgraph:
在该文件夹下,执行 docker-compose up -d -d是指后台启动,我们可以通过docker-compose logs 查看后台启动日志。
4. dgraph服务使用
浏览器访问 http://127.0.0.1:8000 执行服务使用。