pandoc / dockerfiles

Dockerfiles for various pandoc images
GNU General Public License v2.0
364 stars 98 forks source link

Pandoc Server in Docker #210

Closed kimfucious closed 4 months ago

kimfucious commented 1 year ago

I've got an app that produces manuscripts in Markdown.

I've been looking for a way to convert the Markdown to ePub, and I came across Pandoc, which is great.

I've written some code to test Markdown to ePub conversion in my app by sending POST requests to a Pandoc Server running on my local. The text property is a markdown file with YAML metadata.

const payload = {
    standalone: true,
    text: markdown,
    to: "epub",
};
const resp = await fetch("http://localhost:3030", {
    method: "POST",
    headers: {
        Accept: "application/json",
        "Content-Type": "application/json",
    },
    body: JSON.stringify(payload),
});

This returns some JSON with a base64 encoded string, which works for my use case.

What I'd like to do is run Pandoc Server in the cloud somewhere. I've looked at trying to get this done in a serverless function, but it's a bit of a pain.

I've looked at the Docker images, and I'm wondering if I can use one of those to setup a Pandoc Server on a cloud provider (e.g. GCP).

I've Googled and read the docs and haven't found much how to deploy Pandoc Server.

Any helpful advice would be most appreciated.

tarleb commented 4 months ago

Sorry for the late reply. Unfortunately, we can't help with questions like this; they are out of scope for us.