diff --git a/apps/dokploy/public/templates/wikijs.svg b/apps/dokploy/public/templates/wikijs.svg new file mode 100644 index 00000000..78073b23 --- /dev/null +++ b/apps/dokploy/public/templates/wikijs.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 31668a6f..1e18f4ac 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1559,4 +1559,18 @@ export const templates: TemplateData[] = [ tags: ["backend", "database", "api"], load: () => import("./convex/index").then((m) => m.generate), }, + { + id: "wikijs", + name: "Wiki.js", + version: "2.5", + description: "The most powerful and extensible open source Wiki software.", + logo: "wikijs.svg", + links: { + github: "https://github.com/requarks/wiki", + website: "https://js.wiki/", + docs: "https://docs.requarks.io/", + }, + tags: ["knowledge-base", "self-hosted", "documentation"], + load: () => import("./wikijs/index").then((m) => m.generate), + }, ]; diff --git a/apps/dokploy/templates/wikijs/docker-compose.yml b/apps/dokploy/templates/wikijs/docker-compose.yml new file mode 100644 index 00000000..13277419 --- /dev/null +++ b/apps/dokploy/templates/wikijs/docker-compose.yml @@ -0,0 +1,38 @@ +version: '3.5' +services: + wiki: + image: ghcr.io/requarks/wiki:2.5 + restart: unless-stopped + ports: + # Change 5000 to the desired port + - "5000:3000" + environment: + - DB_TYPE + - DB_HOST + - DB_PORT + - DB_USER + - DB_PASS + - DB_NAME + depends_on: + - db + networks: + - dokploy-network + labels: + - traefik.enable=true + - traefik.constraint-label-stack=wikijs + db: + image: postgres:14 + restart: unless-stopped + environment: + - POSTGRES_USER + - POSTGRES_PASSWORD + - POSTGRES_DB + volumes: + - wiki-db-data:/var/lib/postgresql/data + networks: + - dokploy-network +networks: + dokploy-network: + external: true +volumes: + wiki-db-data: diff --git a/apps/dokploy/templates/wikijs/index.ts b/apps/dokploy/templates/wikijs/index.ts new file mode 100644 index 00000000..ff6c234d --- /dev/null +++ b/apps/dokploy/templates/wikijs/index.ts @@ -0,0 +1,35 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const domains: DomainSchema[] = [ + { + host: generateRandomDomain(schema), + port: 3000, + serviceName: "wiki", + }, + ]; + + const envs = [ + "# Database Setup", + "POSTGRES_USER=wikijs", + "POSTGRES_PASSWORD=wikijsrocks", + "POSTGRES_DB=wiki", + "# WikiJS Database Connection", + "DB_TYPE=postgres", + "DB_HOST=db", + "DB_PORT=5432", + "DB_USER=wikijs", + "DB_PASS=wikijsrocks", + "DB_NAME=wiki", + ]; + + return { + domains, + envs, + }; +}