Merge pull request #1065 from nktnet1/gotenberg-template

feat(template): added Gotenberg, a Docker-powered stateless API for PDF files
This commit is contained in:
Mauricio Siu
2025-01-08 22:19:10 -06:00
committed by GitHub
4 changed files with 62 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

View File

@@ -0,0 +1,18 @@
services:
gotenberg:
image: gotenberg/gotenberg:latest
environment:
# NOTE: requires the --api-enable-basic-auth option in "command"
# make sure to also change the credentials in Dokploy environment
GOTENBERG_API_BASIC_AUTH_USERNAME: ${GOTENBERG_API_BASIC_AUTH_USERNAME}
GOTENBERG_API_BASIC_AUTH_PASSWORD: ${GOTENBERG_API_BASIC_AUTH_PASSWORD}
command: [
"gotenberg",
# See the full list of options at https://gotenberg.dev/docs/configuration
# Examples:
"--api-enable-basic-auth"
#"--api-timeout=60s",
#"--chromium-auto-start"
]
restart: unless-stopped

View File

@@ -0,0 +1,29 @@
import {
type DomainSchema,
type Schema,
type Template,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const username = 'gotenberg';
const password = 'changethis';
const domains: DomainSchema[] = [
{
host: generateRandomDomain(schema),
port: 3000,
serviceName: "gotenberg",
},
];
const envs = [
`GOTENBERG_API_BASIC_AUTH_USERNAME=${username}`,
`GOTENBERG_API_BASIC_AUTH_PASSWORD=${password}`,
];
return {
envs,
domains,
};
}

View File

@@ -1196,4 +1196,19 @@ export const templates: TemplateData[] = [
tags: ["self-hosted", "monitoring", "uptime"],
load: () => import("./checkmate/index").then((m) => m.generate),
},
{
id: "gotenberg",
name: "Gotenberg",
version: "latest",
description:
"Gotenberg is a Docker-powered stateless API for PDF files.",
logo: "gotenberg.png",
links: {
github: "https://github.com/gotenberg/gotenberg",
website: "https://gotenberg.dev",
docs: "https://gotenberg.dev/docs/getting-started/introduction",
},
tags: ["api", "backend", "pdf", "tools"],
load: () => import("./gotenberg/index").then((m) => m.generate),
}
];