Merge pull request #840 from drudge/browserless-template

feat: add Browserless template
This commit is contained in:
Mauricio Siu
2024-12-08 01:07:53 -06:00
committed by GitHub
4 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
<svg version="1.2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024">
<title>favicon</title>
<defs>
<linearGradient id="g1" x1="220.3" y1="854.7" x2="760.4" y2="517.2" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#ff3c95"/>
<stop offset="1" stop-color="#ffc550"/>
</linearGradient>
</defs>
<style>
.s0 { fill: url(#g1) }
</style>
<path id="Path 0" class="s0" d="m243.9 0c0.3 0.1 26.4 15 115.1 66.5v411.8c0 391.6 0.1 411.7 1.8 411.2 0.9-0.3 69.7-34 304.1-149l0.1-61.8c0-48.9-0.3-61.6-1.3-61.3-0.6 0.2-43.6 20-95.5 44-51.8 24-94.4 43.5-94.7 43.3-0.2-0.1-0.3-128.3 0-569.6l115.5 68 1.1 256.4 191.4 111.4 0.5 243.6-213.1 104.5c-117.2 57.5-213.9 104.6-214.8 104.8-0.9 0.2-26.5-16.3-112.2-73.3l0.1-296.5c0-163.1 0.3-376.9 0.7-475.2 0.3-98.4 0.9-178.8 1.2-178.8z"/>
</svg>

After

Width:  |  Height:  |  Size: 836 B

View File

@@ -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

View File

@@ -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,
};
}

View File

@@ -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",