Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pandoc microservice #4

Merged
merged 11 commits into from
Apr 26, 2024
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ FROM golang:1.21-alpine
WORKDIR /app

RUN apk update && \
apk add openssl && \
openssl s_client -connect helloworld.letsencrypt.org:443 -showcerts </dev/null 2>/dev/null | sed -e '/-----BEGIN/,/-----END/!d' | tee "/usr/local/share/ca-certificates/ca.crt" >/dev/null && \
update-ca-certificates
apk add curl bash ca-certificates && \
update-ca-certificates

COPY . ./
RUN go mod download && \
Expand Down
9 changes: 9 additions & 0 deletions docker-images/pandoc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ARG TAG=main
ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG} AS scyllaridae
FROM pandoc/latex:3.1.1 AS pandoc

WORKDIR /app
COPY --from=scyllaridae /app/scyllaridae /app/scyllaridae
COPY scyllaridae.yml .
ENTRYPOINT ["/app/scyllaridae"]
12 changes: 12 additions & 0 deletions docker-images/pandoc/scyllaridae.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
destinationHttpMethod: PUT
allowedMimeTypes:
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
- "application/xml"
cmdByMimeType:
default:
cmd: /usr/local/bin/pandoc
args:
- "-f"
- "docx"
- "-t"
- "pdf"
Loading