Skip to content

Commit

Permalink
fix: ensure tmp folder is present on docker container (#910)
Browse files Browse the repository at this point in the history
* chore: add logger to bookmark update cache

* ensure there's a tmp folder in the container
  • Loading branch information
fmartingr authored May 15, 2024
1 parent 647945c commit 4de4799
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ ARG TARGETOS
ARG TARGETVARIANT
COPY dist/shiori_${TARGETOS}_${TARGETARCH}${TARGETVARIANT}/shiori /usr/bin/shiori
RUN apk add --no-cache ca-certificates tzdata && \
chmod +x /usr/bin/shiori
chmod +x /usr/bin/shiori && \
rm -rf /tmp/*

# Server image
FROM scratch
Expand All @@ -20,6 +21,7 @@ WORKDIR ${SHIORI_DIR}
LABEL org.opencontainers.image.source="https://github.com/go-shiori/shiori"
LABEL maintainer="Felipe Martin <[email protected]>"

COPY --from=builder /tmp /tmp
COPY --from=builder /usr/bin/shiori /usr/bin/shiori
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
Expand Down
5 changes: 5 additions & 0 deletions internal/http/routes/api/v1/bookmarks.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ func (r *BookmarksAPIRoutes) updateCache(c *gin.Context) {
content.Close()

if err != nil {
r.logger.WithFields(logrus.Fields{
"bookmark_id": book.ID,
"url": book.URL,
"error": err,
}).Error("error downloading bookmark cache")
chProblem <- book.ID
return
}
Expand Down

0 comments on commit 4de4799

Please sign in to comment.