diff --git a/apps/dokploy/public/templates/gotenberg.png b/apps/dokploy/public/templates/gotenberg.png new file mode 100644 index 00000000..5db2c6f8 Binary files /dev/null and b/apps/dokploy/public/templates/gotenberg.png differ diff --git a/apps/dokploy/templates/gotenberg/docker-compose.yml b/apps/dokploy/templates/gotenberg/docker-compose.yml new file mode 100644 index 00000000..02bbacb7 --- /dev/null +++ b/apps/dokploy/templates/gotenberg/docker-compose.yml @@ -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 \ No newline at end of file diff --git a/apps/dokploy/templates/gotenberg/index.ts b/apps/dokploy/templates/gotenberg/index.ts new file mode 100644 index 00000000..1b9d77bc --- /dev/null +++ b/apps/dokploy/templates/gotenberg/index.ts @@ -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, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index c620b29a..427798ec 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -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), + } ];