简体   繁体   English

Cayley Docker没有写数据

[英]Cayley docker isn't writing data

I'm using [or, trying to use] the docker cayley from here: https://github.com/saidimu/cayley-docker 我正在从这里使用[或尝试使用] docker cayley: https : //github.com/saidimu/cayley-docker

I created a data dir at /var/lib/apps/cayley/data and dropped the .cfg file in there that I was instructed to make: 我在/var/lib/apps/cayley/data创建了一个数据目录,并将.cfg文件拖放到该文件中,指示执行该操作:

{
  "database": "myapp",
  "db_path": "/var/lib/apps/cayley/data",
  "listen_host": "0.0.0.0"
}

I ran docker cayley with: 我用以下命令运行docker cayley:

docker run -d -p 64210:64210 -v /var/lib/apps/cayley/data/:/data saidimu/cayley:v0.4.0

and it runs fine, I'm looking at it's UI in the browser: 它运行良好,我正在浏览器中查看它的UI:

在此处输入图片说明

And I add a triple or two, and I get success messages. 然后添加三到两个,我会收到成功消息。

Then I go to the query interface and try to list any vertices: 然后,我进入查询界面并尝试列出所有顶点:

> g.V

and there is nothing to be found (I think): 而且没有发现(我认为):

{
 "result": null
}

and there is nothing written in the data directory I created. 而且我创建的数据目录中没有写入任何内容。

Any ideas why data isn't being written? 有什么想法为什么不写入数据?

Edit: just to be sure there wasn't something wrong with my data directory, I ran the local volume mounted docker for neo4j on the same directory and it saved data correctly. 编辑:只是为了确保我的数据目录没有问题,我在同一目录上为neo4j运行了本地卷挂载的neo4j ,它正确地保存了数据。 So, that eliminates some possibilities. 因此,这消除了一些可能性。

I can not comment yet but I think to obtain results from your query you need to use the All keyword 我还不能发表评论,但我认为要从您的查询中获取结果,您需要使用All关键字

g.V().All() // Print All the vertices
OR
g.V().Limit(20) // Limits the results to 20

If that was not your problem I can edit and share my dockerfile which is derived from the same docker-file that you are using. 如果那不是您的问题,我可以编辑和共享我的dockerfile,该文件是从您使用的同一docker-file派生的。

You may refer to the lib here to learn more about how to use Cayley's APIs and the data format in Cayley and some other stuff like N-Triples N-quads and RDF: 您可以在此处参考lib,以了解有关如何使用Cayley的API以及Cayley以及其他一些类似N-Triples N-quads和RDF之类的数据格式的信息:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM