mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
29 lines
520 B
TypeScript
29 lines
520 B
TypeScript
import {
|
|
type DomainSchema,
|
|
type Schema,
|
|
type Template,
|
|
generatePassword,
|
|
generateRandomDomain,
|
|
} from "../utils";
|
|
|
|
export function generate(schema: Schema): Template {
|
|
const mainDomain = generateRandomDomain(schema);
|
|
const dbPassword = generatePassword();
|
|
const dbUsername = "langflow";
|
|
|
|
const domains: DomainSchema[] = [
|
|
{
|
|
host: mainDomain,
|
|
port: 7860,
|
|
serviceName: "langflow",
|
|
},
|
|
];
|
|
|
|
const envs = [`DB_PASSWORD=${dbPassword}`, `DB_USERNAME=${dbUsername}`];
|
|
|
|
return {
|
|
domains,
|
|
envs,
|
|
};
|
|
}
|