feat: added couchdb template

This commit is contained in:
Slaven Ivanov
2025-01-17 18:04:43 +02:00
parent ad479c4be1
commit a9a0b4cb03
4 changed files with 60 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

View File

@@ -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

View File

@@ -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,
};
}

View File

@@ -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),
}
];