Skip to content

Commit 074e3b6

Browse files
authored
Merge pull request #1194 from wish-oss/feat/spacedrive-template
feat: add spacedrive file manager template
2 parents de35812 + 7061e06 commit 074e3b6

File tree

4 files changed

+57
-2
lines changed

4 files changed

+57
-2
lines changed
319 KB
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
server:
3+
image: ghcr.io/spacedriveapp/spacedrive/server:latest
4+
ports:
5+
- 8080
6+
environment:
7+
- SD_AUTH=${SD_USERNAME}:${SD_PASSWORD}
8+
volumes:
9+
- /var/spacedrive:/var/spacedrive
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import {
2+
type DomainSchema,
3+
type Schema,
4+
type Template,
5+
generateRandomDomain,
6+
generatePassword,
7+
} from "../utils";
8+
9+
export function generate(schema: Schema): Template {
10+
const randomDomain = generateRandomDomain(schema);
11+
const secretKey = generatePassword();
12+
const randomUsername = "admin"; // Default username
13+
14+
const domains: DomainSchema[] = [
15+
{
16+
host: randomDomain,
17+
port: 8080,
18+
serviceName: "server",
19+
},
20+
];
21+
22+
const envs = [
23+
`SD_USERNAME=${randomUsername}`,
24+
`SD_PASSWORD=${secretKey}`,
25+
];
26+
27+
return {
28+
envs,
29+
domains,
30+
};
31+
}

apps/dokploy/templates/templates.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ export const templates: TemplateData[] = [
538538
website: "https://filebrowser.org/",
539539
docs: "https://filebrowser.org/",
540540
},
541-
tags: ["file", "manager"],
541+
tags: ["file-manager","storage"],
542542
load: () => import("./filebrowser/index").then((m) => m.generate),
543543
},
544544
{
@@ -834,7 +834,7 @@ export const templates: TemplateData[] = [
834834
website: "https://nextcloud.com/",
835835
docs: "https://docs.nextcloud.com/",
836836
},
837-
tags: ["file", "sync"],
837+
tags: ["file-manager", "sync"],
838838
load: () => import("./nextcloud-aio/index").then((m) => m.generate),
839839
},
840840
{
@@ -1342,6 +1342,20 @@ export const templates: TemplateData[] = [
13421342
load: () => import("./homarr/index").then((m) => m.generate),
13431343
},
13441344
{
1345+
id: "spacedrive",
1346+
name: "Spacedrive",
1347+
version: "latest",
1348+
description:
1349+
"Spacedrive is a cross-platform file manager. It connects your devices together to help you organize files from anywhere. powered by a virtual distributed filesystem (VDFS) written in Rust. Organize files across many devices in one place.",
1350+
links: {
1351+
github: "https://github.com/spacedriveapp/spacedrive",
1352+
website: "https://spacedrive.com/",
1353+
docs: "https://www.spacedrive.com/docs/product/getting-started/introduction",
1354+
},
1355+
logo: "spacedrive.png",
1356+
tags: ["file-manager", "vdfs", "storage"],
1357+
},
1358+
{
13451359
id: "alist",
13461360
name: "AList",
13471361
version: "v3.41.0",
@@ -1355,5 +1369,6 @@ export const templates: TemplateData[] = [
13551369
},
13561370
tags: ["file", "webdav", "storage"],
13571371
load: () => import("./alist/index").then((m) => m.generate),
1372+
13581373
},
13591374
];

0 commit comments

Comments
 (0)