mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1354 from drudge/templates/linkwarden
feat: add Linkwarden template
This commit is contained in:
BIN
apps/dokploy/public/templates/linkwarden.png
Normal file
BIN
apps/dokploy/public/templates/linkwarden.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
40
apps/dokploy/templates/linkwarden/docker-compose.yml
Normal file
40
apps/dokploy/templates/linkwarden/docker-compose.yml
Normal 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:
|
||||
33
apps/dokploy/templates/linkwarden/index.ts
Normal file
33
apps/dokploy/templates/linkwarden/index.ts
Normal 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,
|
||||
};
|
||||
}
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user