diff --git a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx index c25acc67..116efedf 100644 --- a/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx +++ b/apps/dokploy/components/dashboard/docker/logs/terminal-line.tsx @@ -35,45 +35,34 @@ export function TerminalLine({ log, noTimestamp, searchTerm }: LogLineProps) { }) : "--- No time found ---"; - const highlightMessage = (text: string, term: string) => { - if (!term) { + const highlightMessage = (text: string, term: string) => { + if (!term) { + return ( + + ); + } + + const htmlContent = fancyAnsi.toHtml(text); + const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi"); + + const modifiedContent = htmlContent.replace( + searchRegex, + (match) => + `${match}`, + ); + return ( ); - } - - const htmlContent = fancyAnsi.toHtml(text); - const modifiedContent = htmlContent.replace( - /]*)>([^<]*)<\/span>/g, - (match, attrs, content) => { - const searchRegex = new RegExp(`(${escapeRegExp(term)})`, "gi"); - if (!content.match(searchRegex)) return match; - - const segments = content.split(searchRegex); - const wrappedSegments = segments - .map((segment: string) => - segment.toLowerCase() === term.toLowerCase() - ? `${segment}` - : segment, - ) - .join(""); - - return `${wrappedSegments}`; - }, - ); - - return ( - - ); - }; + }; const tooltip = (color: string, timestamp: string | null) => { const square = ( diff --git a/apps/dokploy/public/templates/mailpit.svg b/apps/dokploy/public/templates/mailpit.svg new file mode 100644 index 00000000..58675a26 --- /dev/null +++ b/apps/dokploy/public/templates/mailpit.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/apps/dokploy/templates/mailpit/docker-compose.yml b/apps/dokploy/templates/mailpit/docker-compose.yml new file mode 100644 index 00000000..d0dbdb8e --- /dev/null +++ b/apps/dokploy/templates/mailpit/docker-compose.yml @@ -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: \ No newline at end of file diff --git a/apps/dokploy/templates/mailpit/index.ts b/apps/dokploy/templates/mailpit/index.ts new file mode 100644 index 00000000..25f18f7e --- /dev/null +++ b/apps/dokploy/templates/mailpit/index.ts @@ -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, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 1e18f4ac..970232e3 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -25,8 +25,8 @@ export const templates: TemplateData[] = [ "Outline is a self-hosted knowledge base and documentation platform that allows you to build and manage your own knowledge base applications.", links: { github: "https://github.com/outline/outline", - website: "https://outline.com/", - docs: "https://docs.outline.com/", + website: "https://getoutline.com/", + docs: "https://docs.getoutline.com/s/guide", }, logo: "outline.png", load: () => import("./outline/index").then((m) => m.generate), @@ -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", @@ -426,7 +441,7 @@ export const templates: TemplateData[] = [ { id: "umami", name: "Umami", - version: "v2.14.0", + version: "v2.16.1", description: "Umami is a simple, fast, privacy-focused alternative to Google Analytics.", logo: "umami.png", @@ -1574,3 +1589,4 @@ export const templates: TemplateData[] = [ load: () => import("./wikijs/index").then((m) => m.generate), }, ]; + diff --git a/apps/dokploy/templates/umami/docker-compose.yml b/apps/dokploy/templates/umami/docker-compose.yml index 87568165..26efd337 100644 --- a/apps/dokploy/templates/umami/docker-compose.yml +++ b/apps/dokploy/templates/umami/docker-compose.yml @@ -1,6 +1,6 @@ services: umami: - image: ghcr.io/umami-software/umami:postgresql-v2.14.0 + image: ghcr.io/umami-software/umami:postgresql-v2.16.1 restart: always healthcheck: test: ["CMD-SHELL", "curl http://localhost:3000/api/heartbeat"]