From 22927c27165e98172babd9720b455dd82689f36e Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 10 Dec 2025 00:17:18 -0600 Subject: [PATCH 1/3] feat(domains): add support for traefik.me domain notifications - Implemented checks for traefik.me domains across AddDomain, AddPreviewDomain, and ShowPreviewSettings components. - Added informational alerts to notify users that traefik.me is a public HTTP service and does not support SSL/HTTPS, ensuring clarity in domain configuration. --- .../application/domains/handle-domain.tsx | 9 +++++++++ .../preview-deployments/add-preview-domain.tsx | 16 ++++++++++++++++ .../show-preview-settings.tsx | 10 ++++++++++ 3 files changed, 35 insertions(+) diff --git a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx index bb5366c33..6af0e1e8c 100644 --- a/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx +++ b/apps/dokploy/components/dashboard/application/domains/handle-domain.tsx @@ -208,6 +208,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => { const certificateType = form.watch("certificateType"); const https = form.watch("https"); const domainType = form.watch("domainType"); + const host = form.watch("host"); + const isTraefikMeDomain = host?.includes("traefik.me") || false; useEffect(() => { if (data) { @@ -502,6 +504,13 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => { to make your traefik.me domain work. )} + {isTraefikMeDomain && ( + + Note: traefik.me is a public HTTP + service and does not support SSL/HTTPS. HTTPS and + certificate options will not have any effect. + + )} Host
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx index eac4559f1..863885426 100644 --- a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx +++ b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx @@ -86,6 +86,9 @@ export const AddPreviewDomain = ({ resolver: zodResolver(domain), }); + const host = form.watch("host"); + const isTraefikMeDomain = host?.includes("traefik.me") || false; + useEffect(() => { if (data) { form.reset({ @@ -157,6 +160,13 @@ export const AddPreviewDomain = ({ name="host" render={({ field }) => ( + {isTraefikMeDomain && ( + + Note: traefik.me is a public HTTP + service and does not support SSL/HTTPS. HTTPS and + certificate options will not have any effect. + + )} Host
@@ -245,6 +255,12 @@ export const AddPreviewDomain = ({ Automatically provision SSL Certificate. + {isTraefikMeDomain && ( + + HTTPS is not available for traefik.me domains as it + is a public HTTP-only service. + + )}
diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx index 862d5f87a..32f791029 100644 --- a/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx +++ b/apps/dokploy/components/dashboard/application/preview-deployments/show-preview-settings.tsx @@ -4,6 +4,7 @@ import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; +import { AlertBlock } from "@/components/shared/alert-block"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { @@ -100,6 +101,8 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => { }); const previewHttps = form.watch("previewHttps"); + const wildcardDomain = form.watch("wildcardDomain"); + const isTraefikMeDomain = wildcardDomain?.includes("traefik.me") || false; useEffect(() => { setIsEnabled(data?.isPreviewDeploymentsActive || false); @@ -168,6 +171,13 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
+ {isTraefikMeDomain && ( + + Note: traefik.me is a public HTTP service and + does not support SSL/HTTPS. HTTPS and certificate options will + not have any effect. + + )}
Date: Wed, 10 Dec 2025 00:18:18 -0600 Subject: [PATCH 2/3] test(environment): add isDefault flag to environment tests - Updated test cases for the environment structure to include the new `isDefault` boolean flag. - Ensured consistency in the environment schema across different test files, enhancing test coverage for environment-related functionalities. --- apps/dokploy/__test__/drop/drop.test.ts | 1 + apps/dokploy/__test__/traefik/traefik.test.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/dokploy/__test__/drop/drop.test.ts b/apps/dokploy/__test__/drop/drop.test.ts index 901e59c42..1c0a446a3 100644 --- a/apps/dokploy/__test__/drop/drop.test.ts +++ b/apps/dokploy/__test__/drop/drop.test.ts @@ -68,6 +68,7 @@ const baseApp: ApplicationNested = { previewWildcard: "", environment: { env: "", + isDefault: false, environmentId: "", name: "", createdAt: "", diff --git a/apps/dokploy/__test__/traefik/traefik.test.ts b/apps/dokploy/__test__/traefik/traefik.test.ts index 01ecb9e8e..8e678413c 100644 --- a/apps/dokploy/__test__/traefik/traefik.test.ts +++ b/apps/dokploy/__test__/traefik/traefik.test.ts @@ -50,6 +50,7 @@ const baseApp: ApplicationNested = { environmentId: "", environment: { env: "", + isDefault: false, environmentId: "", name: "", createdAt: "", From 70f50dd8bc12ff79333bdb655a12f0429ea97318 Mon Sep 17 00:00:00 2001 From: Mauricio Siu Date: Wed, 10 Dec 2025 00:18:50 -0600 Subject: [PATCH 3/3] refactor(preview-deployments): remove warning alert for traefik.me domains - Eliminated the alert block that notified users about the lack of HTTPS support for traefik.me domains, streamlining the user interface in the AddPreviewDomain component. --- .../application/preview-deployments/add-preview-domain.tsx | 6 ------ 1 file changed, 6 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx index 863885426..bb9321a51 100644 --- a/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx +++ b/apps/dokploy/components/dashboard/application/preview-deployments/add-preview-domain.tsx @@ -255,12 +255,6 @@ export const AddPreviewDomain = ({ Automatically provision SSL Certificate. - {isTraefikMeDomain && ( - - HTTPS is not available for traefik.me domains as it - is a public HTTP-only service. - - )}