feat: implement PDF generation and update Dockerfile
- Add PDF generation using go-pdf/fpdf (Pure Go library) - Walk markdown AST and render directly to PDF - Update Dockerfile to include themes directory and config - Fix ENTRYPOINT format for serve mode Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
This commit is contained in:
11
dockerfile
11
dockerfile
@@ -19,7 +19,7 @@ RUN CGO_ENABLED=0 GOOS=${GO_OS} GOARCH=${GO_ARCH} \
|
||||
go build \
|
||||
-installsuffix cgo \
|
||||
-ldflags="-w -s -X 'main.APP_VERSION=${APP_VERSION}' -X 'main.COMMIT_ID=$(git log HEAD --oneline | awk '{print $1}' | head -n1)'" \
|
||||
--o /gocv
|
||||
-o /gocv
|
||||
|
||||
# Stage 2 · scratch image
|
||||
FROM scratch
|
||||
@@ -28,6 +28,13 @@ FROM scratch
|
||||
COPY --from=build /gocv /gocv
|
||||
# Copy the certificates - in case of fetches
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem
|
||||
# Copy themes for templates
|
||||
COPY --from=build $GOPATH/src/${GIT_HOST}/${REPO_ORG}/${REPO_NAME}/themes /themes
|
||||
# Copy default config
|
||||
COPY --from=build $GOPATH/src/${GIT_HOST}/${REPO_ORG}/${REPO_NAME}/config.yaml /config.yaml
|
||||
|
||||
# Create content and output directories
|
||||
# Note: In scratch image, we need to mount these at runtime
|
||||
|
||||
# Execute the binary
|
||||
ENTRYPOINT ["/gocv serve"]
|
||||
ENTRYPOINT ["/gocv", "serve"]
|
||||
|
||||
Reference in New Issue
Block a user