Files
dokploy/templates/glitchtip/index.ts
2024-06-30 23:49:29 -06:00

24 lines
481 B
TypeScript

import {
generateHash,
generateRandomDomain,
type Template,
type Schema,
generateBase64,
} from "../utils";
export function generate(schema: Schema): Template {
const mainServiceHash = generateHash(schema.projectName);
const randomDomain = generateRandomDomain(schema);
const secretKey = generateBase64(32);
const envs = [
`GLITCHTIP_HOST=${randomDomain}`,
"GLITCHTIP_PORT=8000",
`SECRET_KEY=${secretKey}`,
`HASH=${mainServiceHash}`,
];
return {
envs,
};
}