fix(deploy): app-owned cache/books dirs in image + .dockerignore

This commit is contained in:
2026-09-07 12:18:49 +08:00
parent 94b215c2b3
commit f7c27272ba
2 changed files with 6 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
.env
.git
library/
.superpowers/
backend/booklib*
+1
View File
@@ -8,6 +8,7 @@ RUN CGO_ENABLED=0 go build -trimpath -o /server ./cmd/server
FROM alpine:3.20 FROM alpine:3.20
RUN adduser -D -H app RUN adduser -D -H app
COPY --from=build /server /server COPY --from=build /server /server
RUN mkdir -p /data/cache /data/books && chown app:app /data/cache /data/books
USER app USER app
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["/server"] ENTRYPOINT ["/server"]