mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
32 lines
574 B
TypeScript
32 lines
574 B
TypeScript
import {
|
|
type DomainSchema,
|
|
type Schema,
|
|
type Template,
|
|
generateBase64,
|
|
generatePassword,
|
|
generateRandomDomain,
|
|
} from "../utils";
|
|
|
|
export function generate(schema: Schema): Template {
|
|
const domains: DomainSchema[] = [
|
|
{
|
|
host: generateRandomDomain(schema),
|
|
port: 8025,
|
|
serviceName: "mailpit",
|
|
},
|
|
];
|
|
|
|
const defaultPassword = generatePassword();
|
|
|
|
const envs = [
|
|
"# Uncomment below if you want basic auth on UI and SMTP",
|
|
`#MP_UI_AUTH=mailpit:${defaultPassword}`,
|
|
`#MP_SMTP_AUTH=mailpit:${defaultPassword}`,
|
|
];
|
|
|
|
return {
|
|
domains,
|
|
envs,
|
|
};
|
|
}
|