commit
0a6e5fad1a
2 changed files with 35 additions and 2 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM golang:latest
|
||||
MAINTAINER Barak Michener <me@barakmich.com>
|
||||
|
||||
# Set up workdir
|
||||
WORKDIR /go/src/github.com/google/cayley
|
||||
|
||||
# Restore vendored dependencies
|
||||
RUN go get github.com/tools/godep
|
||||
ADD Godeps /go/src/github.com/google/cayley/Godeps
|
||||
RUN godep restore
|
||||
|
||||
# Add and install cayley
|
||||
ADD . .
|
||||
RUN go install -v github.com/google/cayley
|
||||
|
||||
# Expose the port and volume for configuration and data persistence. If you're
|
||||
# using a backend like bolt, make sure the file is saved to this directory.
|
||||
VOLUME ["/data"]
|
||||
EXPOSE 64321
|
||||
|
||||
CMD ["cayley", "http", "-config", "/data/cayley.cfg", "-init"]
|
||||
16
README.md
16
README.md
|
|
@ -5,7 +5,8 @@ Cayley is an open-source graph inspired by the graph database behind [Freebase](
|
|||
|
||||
Its goal is to be a part of the developer's toolbox where [Linked Data](http://linkeddata.org/) and graph-shaped data (semantic webs, social networks, etc) in general are concerned.
|
||||
|
||||
[](https://travis-ci.org/google/cayley)
|
||||
[](https://travis-ci.org/google/cayley)
|
||||
[](https://quay.io/repository/barakmich/cayley)
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -89,7 +90,7 @@ g.V("dani").Tag("source").Out("follows").Tag("target").All()
|
|||
```
|
||||
The visualizer expects to tag nodes as either "source" or "target." Your source is represented as a blue node.
|
||||
While your target is represented as an orange node.
|
||||
The idea being that our node relationship goes from blue to orange (source to target).
|
||||
The idea being that our node relationship goes from blue to orange (source to target).
|
||||
|
||||
**Sample Data**
|
||||
|
||||
|
|
@ -163,6 +164,17 @@ g.V().Has("name", "Casablanca").Follow(filmToActor).Out("name").All()
|
|||
|
||||
There's more in the JavaScript API Documentation, but that should give you a feel for how to walk around the graph.
|
||||
|
||||
## Running in a container
|
||||
|
||||
A container exposing the HTTP API of cayley is available.
|
||||
To run the container one must first setup a data directory that contains the configuration file and optionally contains persistent files (i.e. a boltdb database file).
|
||||
|
||||
```
|
||||
mkdir data
|
||||
cp my_config.cfg data/cayley.cfg
|
||||
docker run -v $PWD/data:/data -p 64321:64321 -d quay.io/barakmich/cayley
|
||||
```
|
||||
|
||||
## Disclaimer
|
||||
|
||||
Not a Google project, but created and maintained [by a Googler](https://github.com/barakmich), with permission from and assignment to Google, under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue