mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #1341 from drudge/templates/mailpit
feat: add Mailpit template
This commit is contained in:
25
apps/dokploy/templates/mailpit/docker-compose.yml
Normal file
25
apps/dokploy/templates/mailpit/docker-compose.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
services:
|
||||
mailpit:
|
||||
image: axllent/mailpit:v1.22.3
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- '1025:1025'
|
||||
volumes:
|
||||
- 'mailpit-data:/data'
|
||||
environment:
|
||||
- MP_SMTP_AUTH_ALLOW_INSECURE=true
|
||||
- MP_MAX_MESSAGES=5000
|
||||
- MP_DATABASE=/data/mailpit.db
|
||||
- MP_UI_AUTH=${MP_UI_AUTH}
|
||||
- MP_SMTP_AUTH=${MP_SMTP_AUTH}
|
||||
healthcheck:
|
||||
test:
|
||||
- CMD
|
||||
- /mailpit
|
||||
- readyz
|
||||
interval: 5s
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
|
||||
volumes:
|
||||
mailpit-data:
|
||||
31
apps/dokploy/templates/mailpit/index.ts
Normal file
31
apps/dokploy/templates/mailpit/index.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
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,
|
||||
};
|
||||
}
|
||||
@@ -393,6 +393,21 @@ export const templates: TemplateData[] = [
|
||||
tags: ["chat"],
|
||||
load: () => import("./open-webui/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "mailpit",
|
||||
name: "Mailpit",
|
||||
version: "v1.22.3",
|
||||
description:
|
||||
"Mailpit is a tiny, self-contained, and secure email & SMTP testing tool with API for developers.",
|
||||
logo: "mailpit.svg",
|
||||
links: {
|
||||
github: "https://github.com/axllent/mailpit",
|
||||
website: "https://mailpit.axllent.org/",
|
||||
docs: "https://mailpit.axllent.org/docs/",
|
||||
},
|
||||
tags: ["email", "smtp"],
|
||||
load: () => import("./mailpit/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "listmonk",
|
||||
name: "Listmonk",
|
||||
|
||||
Reference in New Issue
Block a user