https://github.com/google/cayley
Raw File
Tip revision: eb35d5032b8d72b82815b13f4ca89aa43736d6a4 authored by bsj625 on 21 September 2017, 20:55:57 UTC
Modified apply deltas
Tip revision: eb35d50
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