diff --git a/apps/dokploy/public/templates/couchdb.png b/apps/dokploy/public/templates/couchdb.png new file mode 100644 index 00000000..7dc4cc4a Binary files /dev/null and b/apps/dokploy/public/templates/couchdb.png differ diff --git a/apps/dokploy/templates/couchdb/docker-compose.yml b/apps/dokploy/templates/couchdb/docker-compose.yml new file mode 100644 index 00000000..41ed372a --- /dev/null +++ b/apps/dokploy/templates/couchdb/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3.8' + +services: + couchdb: + image: couchdb:latest + ports: + - '5984:5984' + volumes: + - couchdb-data:/opt/couchdb/data + environment: + - COUCHDB_USER=${COUCHDB_USER} + - COUCHDB_PASSWORD=${COUCHDB_PASSWORD} + restart: unless-stopped + +volumes: + couchdb-data: + driver: local diff --git a/apps/dokploy/templates/couchdb/index.ts b/apps/dokploy/templates/couchdb/index.ts new file mode 100644 index 00000000..70d71669 --- /dev/null +++ b/apps/dokploy/templates/couchdb/index.ts @@ -0,0 +1,28 @@ +import { + type DomainSchema, + type Schema, + type Template, + generatePassword, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + const username = generatePassword(16); + const password = generatePassword(32); + + const domains: DomainSchema[] = [ + { + serviceName: "couchdb", + host: mainDomain, + port: 5984, + }, + ]; + + const envs = [`COUCHDB_USER=${username}`, `COUCHDB_PASSWORD=${password}`]; + + return { + envs, + domains, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index cb7f22e4..faed2387 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1269,5 +1269,19 @@ export const templates: TemplateData[] = [ }, tags: ["cloud", "networking", "security", "tunnel"], load: () => import("./cloudflared/index").then((m) => m.generate), - }, + },{ + id: "couchdb", + name: "CouchDB", + version: "latest", + description: + "CouchDB is a document-oriented NoSQL database that excels at replication and horizontal scaling.", + logo: "couchdb.png", // we defined the name and the extension of the logo + links: { + github: "lorem", + website: "lorem", + docs: "lorem", + }, + tags: ["database", "storage"], + load: () => import("./couchdb/index").then((m) => m.generate), + } ];