Merge pull request #1354 from drudge/templates/linkwarden

feat: add Linkwarden template
This commit is contained in:
Mauricio Siu
2025-02-23 14:46:41 -06:00
committed by GitHub
4 changed files with 88 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

View File

@@ -0,0 +1,40 @@
services:
linkwarden:
environment:
- NEXTAUTH_SECRET
- NEXTAUTH_URL
- DATABASE_URL=postgresql://linkwarden:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
restart: unless-stopped
image: ghcr.io/linkwarden/linkwarden:v2.9.3
ports:
- 3000
volumes:
- linkwarden-data:/data/data
depends_on:
- postgres
healthcheck:
test: curl --fail http://localhost:3000 || exit 1
interval: 60s
retries: 2
start_period: 60s
timeout: 15s
postgres:
image: postgres:17-alpine
restart: unless-stopped
user: postgres
environment:
POSTGRES_USER: linkwarden
POSTGRES_DB: linkwarden
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
linkwarden-data:
postgres-data:

View File

@@ -0,0 +1,33 @@
import {
type DomainSchema,
type Schema,
type Template,
generateBase64,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const postgresPassword = generatePassword();
const nextSecret = generateBase64(32);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3000,
serviceName: "linkwarden",
},
];
const envs = [
`POSTGRES_PASSWORD=${postgresPassword}`,
`NEXTAUTH_SECRET=${nextSecret}`,
`NEXTAUTH_URL=http://${mainDomain}/api/v1/auth`,
];
return {
domains,
envs,
};
}

View File

@@ -677,6 +677,21 @@ export const templates: TemplateData[] = [
tags: ["open-source"],
load: () => import("./vaultwarden/index").then((m) => m.generate),
},
{
id: "linkwarden",
name: "Linkwarden",
version: "2.9.3",
description:
"Self-hosted, open-source collaborative bookmark manager to collect, organize and archive webpages.",
logo: "linkwarden.png",
links: {
github: "https://github.com/linkwarden/linkwarden",
website: "https://linkwarden.app/",
docs: "https://docs.linkwarden.app/",
},
tags: ["bookmarks", "link-sharing"],
load: () => import("./linkwarden/index").then((m) => m.generate),
},
{
id: "hi-events",
name: "Hi.events",