https://github.com/google/cayley
Raw File
Tip revision: 1ee1c6ab2c80df0b08b6766187f8088357fd507a authored by sah607 on 21 September 2017, 20:53:57 UTC
Add Elastic Iterator
Tip revision: 1ee1c6a
Dockerfile
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"]
back to top