mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: listmonk template
This commit is contained in:
52
templates/listmonk/index.ts
Normal file
52
templates/listmonk/index.ts
Normal file
@@ -0,0 +1,52 @@
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
type Template,
|
||||
type Schema,
|
||||
generatePassword,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const adminPassword = generatePassword(32);
|
||||
|
||||
const envs = [
|
||||
`LISTMONK_HOST=${randomDomain}`,
|
||||
"LISTMONK_PORT=9000",
|
||||
`HASH=${mainServiceHash}`,
|
||||
`# login with admin:${adminPassword}`,
|
||||
"# check config.toml in Advanced / Volumes for more options",
|
||||
];
|
||||
|
||||
const mounts: Template["mounts"] = [
|
||||
{
|
||||
mountPath: "./config.toml",
|
||||
content: `[app]
|
||||
address = "0.0.0.0:9000"
|
||||
|
||||
admin_username = "admin"
|
||||
admin_password = "${adminPassword}"
|
||||
|
||||
[db]
|
||||
host = "db"
|
||||
port = 5432
|
||||
user = "listmonk"
|
||||
password = "listmonk"
|
||||
database = "listmonk"
|
||||
|
||||
ssl_mode = "disable"
|
||||
max_open = 25
|
||||
max_idle = 25
|
||||
max_lifetime = "300s"
|
||||
|
||||
params = ""
|
||||
`,
|
||||
},
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
mounts,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user