mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
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:
BIN
apps/dokploy/public/templates/gotenberg.png
Normal file
BIN
apps/dokploy/public/templates/gotenberg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 229 KiB |
18
apps/dokploy/templates/gotenberg/docker-compose.yml
Normal file
18
apps/dokploy/templates/gotenberg/docker-compose.yml
Normal 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
|
||||
29
apps/dokploy/templates/gotenberg/index.ts
Normal file
29
apps/dokploy/templates/gotenberg/index.ts
Normal 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,
|
||||
};
|
||||
}
|
||||
@@ -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),
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user