https://github.com/google/cayley
Revision 12183c6214f8336bb7c2a9151c48ab7774a766a5 authored by Denys Smirnov on 09 July 2016, 11:12:30 UTC, committed by Denys Smirnov on 09 July 2016, 11:12:30 UTC
* fix host/port in Dockerfile
* serve 30kmoviedata by default
* update docs for running in container
1 parent d42aa90
Raw File
Tip revision: 12183c6214f8336bb7c2a9151c48ab7774a766a5 authored by Denys Smirnov on 09 July 2016, 11:12:30 UTC
Updated Dockerfile (fixed #357)
Tip revision: 12183c6
Dockerfile
FROM golang:latest
MAINTAINER Barak Michener <me@barakmich.com>

# Set up workdir
WORKDIR /go/src/github.com/cayleygraph/cayley

# Restore vendored dependencies
RUN go get github.com/tools/godep
ADD Godeps /go/src/github.com/cayleygraph/cayley/Godeps
RUN godep restore

# Add and install cayley
ADD . .
RUN go install -v github.com/cayleygraph/cayley/cmd/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.
RUN mkdir /data #VOLUME ["/data"]
EXPOSE 64210

RUN echo '{"database":"bolt","db_path":"/data/cayley","read_only":false}' > /data/cayley.cfg
RUN cayley init -db bolt -dbpath /data/cayley -quads ./data/30kmoviedata.nq.gz

ENTRYPOINT ["cayley", "http", "-config", "/data/cayley.cfg", "-host", "0.0.0.0", "-port", "64210"]
back to top