mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: migrate templates
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
16
blueprints/mailpit/template.yml
Normal file
16
blueprints/mailpit/template.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
variables:
|
||||
main_domain: ${randomDomain}
|
||||
default_password: ${generatePassword()}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: mailpit
|
||||
port: 8025
|
||||
host: ${main_domain}
|
||||
|
||||
env:
|
||||
# Uncomment below if you want basic auth on UI and SMTP
|
||||
#MP_UI_AUTH: mailpit:${default_password}
|
||||
#MP_SMTP_AUTH: mailpit:${default_password}
|
||||
|
||||
mounts: []
|
||||
Reference in New Issue
Block a user