Skip to content

Commit

Permalink
Change local storage directory to /loki/ and fix permissions (#1833) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario-Hofstaetter authored Mar 23, 2020
1 parent a0dc10a commit 2a03cde
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions cmd/loki/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ RUN make clean && (if [ "${TOUCH_PROTOS}" ]; then make touch-protos; fi) && make

FROM alpine:3.9
RUN apk add --update --no-cache ca-certificates

COPY --from=build /src/loki/cmd/loki/loki /usr/bin/loki
COPY cmd/loki/loki-local-config.yaml /etc/loki/local-config.yaml

RUN addgroup -g 1000 -S loki && \
adduser -u 1000 -S loki -G loki
RUN mkdir -p /loki && \
chown -R loki:loki /etc/loki /loki
USER loki
COPY --from=build /src/loki/cmd/loki/loki /usr/bin/loki
COPY cmd/loki/loki-local-config.yaml /etc/loki/local-config.yaml
EXPOSE 8080
ENTRYPOINT [ "/usr/bin/loki" ]
CMD ["-config.file=/etc/loki/local-config.yaml"]
4 changes: 2 additions & 2 deletions cmd/loki/loki-local-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ schema_config:

storage_config:
boltdb:
directory: /tmp/loki/index
directory: /loki/index

filesystem:
directory: /tmp/loki/chunks
directory: /loki/chunks

limits_config:
enforce_metric_name: false
Expand Down

0 comments on commit 2a03cde

Please sign in to comment.