mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #200 from ciocan/feat/listmonk
feat: listmonk template
This commit is contained in:
commit
675fbb7692
BIN
public/templates/listmonk.png
Normal file
BIN
public/templates/listmonk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
56
templates/listmonk/docker-compose.yml
Normal file
56
templates/listmonk/docker-compose.yml
Normal file
@ -0,0 +1,56 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:13
|
||||
ports:
|
||||
- 5432
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=listmonk
|
||||
- POSTGRES_USER=listmonk
|
||||
- POSTGRES_DB=listmonk
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U listmonk"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 6
|
||||
volumes:
|
||||
- listmonk-data:/var/lib/postgresql/data
|
||||
|
||||
setup:
|
||||
image: listmonk/listmonk:v3.0.0
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- ./config.toml:/listmonk/config.toml
|
||||
depends_on:
|
||||
- db
|
||||
command: [sh, -c, "sleep 3 && ./listmonk --install --idempotent --yes --config config.toml"]
|
||||
|
||||
app:
|
||||
restart: unless-stopped
|
||||
image: listmonk/listmonk:v3.0.0
|
||||
ports:
|
||||
- "${LISTMONK_PORT}"
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- TZ=Etc/UTC
|
||||
depends_on:
|
||||
- db
|
||||
- setup
|
||||
volumes:
|
||||
- ./config.toml:/listmonk/config.toml
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.${HASH}.rule=Host(`${LISTMONK_HOST}`)"
|
||||
- "traefik.http.services.${HASH}.loadbalancer.server.port=${LISTMONK_PORT}"
|
||||
|
||||
volumes:
|
||||
listmonk-data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
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,
|
||||
};
|
||||
}
|
@ -332,6 +332,20 @@ export const templates: TemplateData[] = [
|
||||
tags: ['chat'],
|
||||
load: () => import('./open-webui/index').then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: 'listmonk',
|
||||
name: 'Listmonk',
|
||||
version: 'v3.0.0',
|
||||
description: 'High performance, self-hosted, newsletter and mailing list manager with a modern dashboard.',
|
||||
logo: 'listmonk.png',
|
||||
links: {
|
||||
github: 'https://github.com/knadh/listmonk',
|
||||
website: 'https://listmonk.app/',
|
||||
docs: 'https://listmonk.app/docs/',
|
||||
},
|
||||
tags: ['email', 'newsletter', 'mailing-list'],
|
||||
load: () => import('./listmonk/index').then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: 'doublezero',
|
||||
name: 'Double Zero',
|
||||
|
Loading…
Reference in New Issue
Block a user