Skip to content

Commit

Permalink
[minor] Add pandoc microservice (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Apr 26, 2024
1 parent a9b92c7 commit f4e0473
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
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"

0 comments on commit f4e0473

Please sign in to comment.