diff --git a/apps/dokploy/public/templates/browserless.svg b/apps/dokploy/public/templates/browserless.svg new file mode 100644 index 00000000..35023f7d --- /dev/null +++ b/apps/dokploy/public/templates/browserless.svg @@ -0,0 +1,13 @@ + + favicon + + + + + + + + + \ No newline at end of file diff --git a/apps/dokploy/templates/browserless/docker-compose.yml b/apps/dokploy/templates/browserless/docker-compose.yml new file mode 100644 index 00000000..11d6d95f --- /dev/null +++ b/apps/dokploy/templates/browserless/docker-compose.yml @@ -0,0 +1,16 @@ +services: + browserless: + image: ghcr.io/browserless/chromium:v2.23.0 + environment: + TOKEN: ${BROWSERLESS_TOKEN} + expose: + - 3000 + healthcheck: + test: + - CMD + - curl + - '-f' + - 'http://127.0.0.1:3000/docs' + interval: 2s + timeout: 10s + retries: 15 diff --git a/apps/dokploy/templates/browserless/index.ts b/apps/dokploy/templates/browserless/index.ts new file mode 100644 index 00000000..f922e863 --- /dev/null +++ b/apps/dokploy/templates/browserless/index.ts @@ -0,0 +1,28 @@ +import { + type DomainSchema, + type Schema, + type Template, + generatePassword, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainHost = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainHost, + port: 3000, + serviceName: "browserless", + }, + ]; + const envs = [ + `BROWERLESS_HOST=${mainHost}`, + `BROWSERLESS_TOKEN=${generatePassword(16)}`, + ]; + + return { + envs, + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 91a1144c..78f1f522 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1003,6 +1003,21 @@ export const templates: TemplateData[] = [ load: () => import("./triggerdotdev/index").then((m) => m.generate), }, { + id: "browserless", + name: "Browserless", + version: "2.23.0", + description: + "Browserless allows remote clients to connect and execute headless work, all inside of docker. It supports the standard, unforked Puppeteer and Playwright libraries, as well offering REST-based APIs for common actions like data collection, PDF generation and more.", + logo: "browserless.svg", + links: { + github: "https://github.com/browserless/browserless", + website: "https://www.browserless.io/", + docs: "https://docs.browserless.io/", + }, + tags: ["browser", "automation"], + load: () => import("./browserless/index").then((m) => m.generate), + }, + { id: "drawio", name: "draw.io", version: "24.7.17",