mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
28 lines
633 B
TypeScript
28 lines
633 B
TypeScript
import {
|
|
generateHash,
|
|
generateRandomDomain,
|
|
type Template,
|
|
type Schema,
|
|
generateBase64,
|
|
} from "../utils";
|
|
|
|
// https://cal.com/
|
|
export function generate(schema: Schema): Template {
|
|
const mainServiceHash = generateHash(schema.projectName);
|
|
const randomDomain = generateRandomDomain(schema);
|
|
const calcomEncryptionKey = generateBase64(32);
|
|
const nextAuthSecret = generateBase64(32);
|
|
|
|
const envs = [
|
|
`CALCOM_HOST=${randomDomain}`,
|
|
"CALCOM_PORT=3000",
|
|
`HASH=${mainServiceHash}`,
|
|
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
|
`CALENDSO_ENCRYPTION_KEY=${calcomEncryptionKey}`,
|
|
];
|
|
|
|
return {
|
|
envs,
|
|
};
|
|
}
|