mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add documenso as template
This commit is contained in:
29
templates/documenso/index.ts
Normal file
29
templates/documenso/index.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
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 nextAuthSecret = generateBase64(32);
|
||||
const documensoEncryptionKey = generateBase64(32);
|
||||
const documensoSecondaryEncryptionKey = generateBase64(32);
|
||||
|
||||
const envs = [
|
||||
`DOCUMENSO_HOST=${randomDomain}`,
|
||||
"DOCUMENSO_PORT=3000",
|
||||
`HASH=${mainServiceHash}`,
|
||||
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
||||
`NEXT_PRIVATE_ENCRYPTION_KEY=${documensoEncryptionKey}`,
|
||||
`NEXT_PRIVATE_SECONDARY_ENCRYPTION_KEY=${documensoSecondaryEncryptionKey}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user