forked from cayleygraph/cayley
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (19 loc) · 782 Bytes
/
Dockerfile
File metadata and controls
26 lines (19 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
FROM golang:latest
MAINTAINER Barak Michener <me@barakmich.com>
# Set up workdir
WORKDIR /go/src/github.com/cayleygraph/cayley
# Restore vendored dependencies
RUN sh -c "curl https://glide.sh/get | sh"
ADD glide.* ./
RUN glide install
# Add and install cayley
ADD . .
RUN go install -ldflags="-X github.com/cayleygraph/cayley/version.GitHash=$(git rev-parse HEAD | cut -c1-12)" -v ./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 '{"store":{"backend":"bolt","address":"/data/cayley.db"}}' > /etc/cayley.json
RUN cayley init --config /etc/cayley.json
ENTRYPOINT ["cayley", "http", "--host", ":64210"]