Skip to content

Commit 398fd54

Browse files
authored
Merge pull request #1354 from drudge/templates/linkwarden
feat: add Linkwarden template
2 parents 7f4e4ab + 733f9a0 commit 398fd54

File tree

4 files changed

+88
-0
lines changed

4 files changed

+88
-0
lines changed
78.9 KB
Loading
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
services:
2+
linkwarden:
3+
environment:
4+
- NEXTAUTH_SECRET
5+
- NEXTAUTH_URL
6+
- DATABASE_URL=postgresql://linkwarden:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
7+
restart: unless-stopped
8+
image: ghcr.io/linkwarden/linkwarden:v2.9.3
9+
ports:
10+
- 3000
11+
volumes:
12+
- linkwarden-data:/data/data
13+
depends_on:
14+
- postgres
15+
healthcheck:
16+
test: curl --fail http://localhost:3000 || exit 1
17+
interval: 60s
18+
retries: 2
19+
start_period: 60s
20+
timeout: 15s
21+
22+
postgres:
23+
image: postgres:17-alpine
24+
restart: unless-stopped
25+
user: postgres
26+
environment:
27+
POSTGRES_USER: linkwarden
28+
POSTGRES_DB: linkwarden
29+
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
30+
volumes:
31+
- postgres-data:/var/lib/postgresql/data
32+
healthcheck:
33+
test: ["CMD-SHELL", "pg_isready"]
34+
interval: 10s
35+
timeout: 5s
36+
retries: 5
37+
38+
volumes:
39+
linkwarden-data:
40+
postgres-data:
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import {
2+
type DomainSchema,
3+
type Schema,
4+
type Template,
5+
generateBase64,
6+
generatePassword,
7+
generateRandomDomain,
8+
} from "../utils";
9+
10+
export function generate(schema: Schema): Template {
11+
const mainDomain = generateRandomDomain(schema);
12+
const postgresPassword = generatePassword();
13+
const nextSecret = generateBase64(32);
14+
15+
const domains: DomainSchema[] = [
16+
{
17+
host: mainDomain,
18+
port: 3000,
19+
serviceName: "linkwarden",
20+
},
21+
];
22+
23+
const envs = [
24+
`POSTGRES_PASSWORD=${postgresPassword}`,
25+
`NEXTAUTH_SECRET=${nextSecret}`,
26+
`NEXTAUTH_URL=http://${mainDomain}/api/v1/auth`,
27+
];
28+
29+
return {
30+
domains,
31+
envs,
32+
};
33+
}

apps/dokploy/templates/templates.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -677,6 +677,21 @@ export const templates: TemplateData[] = [
677677
tags: ["open-source"],
678678
load: () => import("./vaultwarden/index").then((m) => m.generate),
679679
},
680+
{
681+
id: "linkwarden",
682+
name: "Linkwarden",
683+
version: "2.9.3",
684+
description:
685+
"Self-hosted, open-source collaborative bookmark manager to collect, organize and archive webpages.",
686+
logo: "linkwarden.png",
687+
links: {
688+
github: "https://github.com/linkwarden/linkwarden",
689+
website: "https://linkwarden.app/",
690+
docs: "https://docs.linkwarden.app/",
691+
},
692+
tags: ["bookmarks", "link-sharing"],
693+
load: () => import("./linkwarden/index").then((m) => m.generate),
694+
},
680695
{
681696
id: "hi-events",
682697
name: "Hi.events",

0 commit comments

Comments
 (0)