From c5073c9f30c090a775302d78489788cdd411fa38 Mon Sep 17 00:00:00 2001 From: Khiet Tam Nguyen Date: Sat, 18 Jan 2025 01:02:39 +1100 Subject: [PATCH] feat(template): added it-tools --- apps/dokploy/public/templates/it-tools.svg | 5 +++++ .../templates/it-tools/docker-compose.yml | 8 ++++++++ apps/dokploy/templates/it-tools/index.ts | 20 +++++++++++++++++++ apps/dokploy/templates/templates.ts | 13 ++++++++++++ 4 files changed, 46 insertions(+) create mode 100644 apps/dokploy/public/templates/it-tools.svg create mode 100644 apps/dokploy/templates/it-tools/docker-compose.yml create mode 100644 apps/dokploy/templates/it-tools/index.ts diff --git a/apps/dokploy/public/templates/it-tools.svg b/apps/dokploy/public/templates/it-tools.svg new file mode 100644 index 000000000..1e3b614da --- /dev/null +++ b/apps/dokploy/public/templates/it-tools.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/apps/dokploy/templates/it-tools/docker-compose.yml b/apps/dokploy/templates/it-tools/docker-compose.yml new file mode 100644 index 000000000..b26665f8a --- /dev/null +++ b/apps/dokploy/templates/it-tools/docker-compose.yml @@ -0,0 +1,8 @@ +services: + it-tools: + image: corentinth/it-tools:latest + healthcheck: + test: ["CMD", "curl", "-f", "http://127.0.0.1:80"] + interval: 30s + timeout: 10s + retries: 3 diff --git a/apps/dokploy/templates/it-tools/index.ts b/apps/dokploy/templates/it-tools/index.ts new file mode 100644 index 000000000..9912c4ba1 --- /dev/null +++ b/apps/dokploy/templates/it-tools/index.ts @@ -0,0 +1,20 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const domains: DomainSchema[] = [ + { + host: generateRandomDomain(schema), + port: 80, + serviceName: "it-tools", + }, + ]; + + return { + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index cb7f22e4f..c517631f8 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1270,4 +1270,17 @@ export const templates: TemplateData[] = [ tags: ["cloud", "networking", "security", "tunnel"], load: () => import("./cloudflared/index").then((m) => m.generate), }, + { + id: "it-tools", + name: "IT Tools", + version: "latest", + description: "A collection of handy online it-tools for developers.", + logo: "it-tools.svg", + links: { + github: "https://github.com/CorentinTh/it-tools", + website: "https://it-tools.tech", + }, + tags: ["developer", "tools"], + load: () => import("./it-tools/index").then((m) => m.generate), + }, ];