Skip to content

Commit e00e19e

Browse files
authored
Merge pull request #1341 from drudge/templates/mailpit
feat: add Mailpit template
2 parents c995268 + c8b1fd3 commit e00e19e

File tree

4 files changed

+77
-0
lines changed

4 files changed

+77
-0
lines changed
Lines changed: 6 additions & 0 deletions
Loading
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
services:
2+
mailpit:
3+
image: axllent/mailpit:v1.22.3
4+
restart: unless-stopped
5+
ports:
6+
- '1025:1025'
7+
volumes:
8+
- 'mailpit-data:/data'
9+
environment:
10+
- MP_SMTP_AUTH_ALLOW_INSECURE=true
11+
- MP_MAX_MESSAGES=5000
12+
- MP_DATABASE=/data/mailpit.db
13+
- MP_UI_AUTH=${MP_UI_AUTH}
14+
- MP_SMTP_AUTH=${MP_SMTP_AUTH}
15+
healthcheck:
16+
test:
17+
- CMD
18+
- /mailpit
19+
- readyz
20+
interval: 5s
21+
timeout: 20s
22+
retries: 10
23+
24+
volumes:
25+
mailpit-data:
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import {
2+
type DomainSchema,
3+
type Schema,
4+
type Template,
5+
generateBase64,
6+
generatePassword,
7+
generateRandomDomain,
8+
} from "../utils";
9+
10+
export function generate(schema: Schema): Template {
11+
const domains: DomainSchema[] = [
12+
{
13+
host: generateRandomDomain(schema),
14+
port: 8025,
15+
serviceName: "mailpit",
16+
},
17+
];
18+
19+
const defaultPassword = generatePassword();
20+
21+
const envs = [
22+
"# Uncomment below if you want basic auth on UI and SMTP",
23+
`#MP_UI_AUTH=mailpit:${defaultPassword}`,
24+
`#MP_SMTP_AUTH=mailpit:${defaultPassword}`,
25+
];
26+
27+
return {
28+
domains,
29+
envs,
30+
};
31+
}

apps/dokploy/templates/templates.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,21 @@ export const templates: TemplateData[] = [
393393
tags: ["chat"],
394394
load: () => import("./open-webui/index").then((m) => m.generate),
395395
},
396+
{
397+
id: "mailpit",
398+
name: "Mailpit",
399+
version: "v1.22.3",
400+
description:
401+
"Mailpit is a tiny, self-contained, and secure email & SMTP testing tool with API for developers.",
402+
logo: "mailpit.svg",
403+
links: {
404+
github: "https://github.com/axllent/mailpit",
405+
website: "https://mailpit.axllent.org/",
406+
docs: "https://mailpit.axllent.org/docs/",
407+
},
408+
tags: ["email", "smtp"],
409+
load: () => import("./mailpit/index").then((m) => m.generate),
410+
},
396411
{
397412
id: "listmonk",
398413
name: "Listmonk",

0 commit comments

Comments
 (0)