From 9145fd34083f650ef16ea70f1ed7c7ec47d947b7 Mon Sep 17 00:00:00 2001 From: MD Mahbub Hasan Date: Sun, 27 Oct 2024 05:36:55 +0600 Subject: [PATCH 1/3] Add Filebrowser template --- apps/dokploy/public/templates/filebrowser.svg | 147 ++++++++++++++++++ .../templates/filebrowser/docker-compose.yml | 14 ++ apps/dokploy/templates/filebrowser/index.ts | 26 ++++ apps/dokploy/templates/templates.ts | 16 ++ 4 files changed, 203 insertions(+) create mode 100644 apps/dokploy/public/templates/filebrowser.svg create mode 100644 apps/dokploy/templates/filebrowser/docker-compose.yml create mode 100644 apps/dokploy/templates/filebrowser/index.ts diff --git a/apps/dokploy/public/templates/filebrowser.svg b/apps/dokploy/public/templates/filebrowser.svg new file mode 100644 index 00000000..5e78eccf --- /dev/null +++ b/apps/dokploy/public/templates/filebrowser.svg @@ -0,0 +1,147 @@ + +image/svg+xml + + + + + \ No newline at end of file diff --git a/apps/dokploy/templates/filebrowser/docker-compose.yml b/apps/dokploy/templates/filebrowser/docker-compose.yml new file mode 100644 index 00000000..10c11909 --- /dev/null +++ b/apps/dokploy/templates/filebrowser/docker-compose.yml @@ -0,0 +1,14 @@ +services: + filebrowser: + image: hurlenko/filebrowser + volumes: + - filebrowser-data:/data + - filebrowser-config:/config + environment: + - FB_BASEURL=${FB_BASEURL} + restart: always + +volumes: + filebrowser-data: + filebrowser-config: + \ No newline at end of file diff --git a/apps/dokploy/templates/filebrowser/index.ts b/apps/dokploy/templates/filebrowser/index.ts new file mode 100644 index 00000000..4ca4f8b9 --- /dev/null +++ b/apps/dokploy/templates/filebrowser/index.ts @@ -0,0 +1,26 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 8080, + serviceName: "filebrowser", + }, + ]; + const envs = [ + "FB_BASEURL=/filebrowser", + ]; + + return { + envs, + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 205bc857..952be545 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -512,4 +512,20 @@ export const templates: TemplateData[] = [ tags: ["self-hosted", "email", "webmail"], load: () => import("./roundcube/index").then((m) => m.generate), }, + + { + id: "filebrowser", + name: "File Browser", + version: "2.31.2", + description: + "Filebrowser is a standalone file manager for uploading, deleting, previewing, renaming, and editing files, with support for multiple users, each with their own directory.", + logo: "filebrowser.svg", + links: { + github: "https://github.com/filebrowser/filebrowser", + website: "https://filebrowser.org/", + docs: "https://filebrowser.org/", + }, + tags: ["file", "manager"], + load: () => import("./filebrowser/index").then((m) => m.generate), + }, ]; From 2c2d59a87c599e10828827a64b7f017e4703342f Mon Sep 17 00:00:00 2001 From: MD Mahbub Hasan Date: Sun, 27 Oct 2024 16:24:42 +0600 Subject: [PATCH 2/3] Format fix --- apps/dokploy/templates/filebrowser/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/dokploy/templates/filebrowser/index.ts b/apps/dokploy/templates/filebrowser/index.ts index 4ca4f8b9..c30519f1 100644 --- a/apps/dokploy/templates/filebrowser/index.ts +++ b/apps/dokploy/templates/filebrowser/index.ts @@ -15,9 +15,7 @@ export function generate(schema: Schema): Template { serviceName: "filebrowser", }, ]; - const envs = [ - "FB_BASEURL=/filebrowser", - ]; + const envs = ["FB_BASEURL=/filebrowser"]; return { envs, From 80015d8d71b263252e694dfaa35f020279df6b5d Mon Sep 17 00:00:00 2001 From: MD Mahbub Hasan Date: Sun, 27 Oct 2024 16:29:14 +0600 Subject: [PATCH 3/3] format fix for templates list --- apps/dokploy/templates/templates.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index dbe818cb..568a18ec 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -526,8 +526,8 @@ export const templates: TemplateData[] = [ }, tags: ["file", "manager"], load: () => import("./filebrowser/index").then((m) => m.generate), - }, - { + }, + { id: "portainer", name: "Portainer", version: "2.21.4",