From 9145fd34083f650ef16ea70f1ed7c7ec47d947b7 Mon Sep 17 00:00:00 2001 From: MD Mahbub Hasan Date: Sun, 27 Oct 2024 05:36:55 +0600 Subject: [PATCH] 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 000000000..5e78eccff --- /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 000000000..10c119091 --- /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 000000000..4ca4f8b9b --- /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 205bc8575..952be5459 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), + }, ];