forked from cayleygraph/cayley
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (18 loc) · 838 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM golang:latest
MAINTAINER Barak Michener <[email protected]>
# 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"]