feat: add glitchtip template

This commit is contained in:
Mauricio Siu
2024-06-30 23:49:29 -06:00
parent addd102d39
commit a43627d869
4 changed files with 108 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
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,
};
}