Skip to content

Commit

Permalink
ci(deploy): fix permissions for data
Browse files Browse the repository at this point in the history
  • Loading branch information
mentos1386 committed Feb 18, 2024
1 parent 2cb4042 commit dc3251d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ COPY . ./
# Build
RUN CGO_ENABLED=1 GOOS=linux go build -o /bin/zdravko cmd/zdravko/main.go

# Prepare the data directory
RUN mkdir -p /data

###
# Final production
FROM gcr.io/distroless/base-debian12:nonroot as production
Expand All @@ -31,7 +34,7 @@ EXPOSE 7233

# Volume to persist sqlite databases
VOLUME /data
RUN mkdir -p /data && chown -R nonroot:nonroot /data
COPY --from=builder --chown=nonroot:nonroot /data /data

ENV DATABASE_PATH=/data/zdravko.db
ENV TEMPORAL_DATABASE_PATH=/data/temporal.db
Expand Down

0 comments on commit dc3251d

Please sign in to comment.