diff --git a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
index bcece796e..93a2d7698 100644
--- a/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/generic/show.tsx
@@ -30,10 +30,10 @@ export const ShowProviderFormCompose = ({ composeId }: Props) => {
Select the source of your code
- {/*
diff --git a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
index e0476d192..bb01badc5 100644
--- a/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
+++ b/apps/dokploy/components/dashboard/compose/general/show-converted-compose.tsx
@@ -10,7 +10,7 @@ import {
DialogTrigger,
} from "@/components/ui/dialog";
import { api } from "@/utils/api";
-import { Puzzle } from "lucide-react";
+import { Puzzle, RefreshCw } from "lucide-react";
import { useState } from "react";
import { toast } from "sonner";
@@ -39,37 +39,47 @@ export const ShowConvertedCompose = ({ composeId }: Props) => {
Converted Compose
- See how the docker compose file will look like after adding the
- domains
+ Preview your docker-compose file with added domains. Note: At least
+ one domain must be specified for this conversion to take effect.
{isError && {error?.message}}
-
diff --git a/apps/dokploy/server/api/routers/domain.ts b/apps/dokploy/server/api/routers/domain.ts
index 2eb2905e5..309dd91ad 100644
--- a/apps/dokploy/server/api/routers/domain.ts
+++ b/apps/dokploy/server/api/routers/domain.ts
@@ -18,7 +18,6 @@ import {
findDomainsByApplicationId,
findDomainsByComposeId,
generateTraefikMeDomain,
- generateWildcard,
removeDomainById,
updateDomainById,
} from "../services/domain";
@@ -52,11 +51,7 @@ export const domainRouter = createTRPCRouter({
.mutation(async ({ input }) => {
return generateTraefikMeDomain(input.appName);
}),
- generateWildcard: protectedProcedure
- .input(apiFindDomainByApplication)
- .mutation(async ({ input }) => {
- return generateWildcard(input);
- }),
+
update: protectedProcedure
.input(apiUpdateDomain)
.mutation(async ({ input }) => {
diff --git a/apps/dokploy/server/api/services/domain.ts b/apps/dokploy/server/api/services/domain.ts
index e3b852c6f..53687d28b 100644
--- a/apps/dokploy/server/api/services/domain.ts
+++ b/apps/dokploy/server/api/services/domain.ts
@@ -45,28 +45,6 @@ export const generateTraefikMeDomain = async (appName: string) => {
});
};
-export const generateWildcard = async (
- input: typeof apiFindDomainByApplication._type,
-) => {
- // const application = await findApplicationById(input.applicationId);
- // const admin = await findAdmin();
- // if (!admin.host) {
- // throw new TRPCError({
- // code: "BAD_REQUEST",
- // message: "We need a host to generate a wildcard domain",
- // });
- // }
- // const domain = await createDomain({
- // applicationId: application.applicationId,
- // host: generateWildcardDomain(application.appName, admin.host || ""),
- // port: 3000,
- // certificateType: "none",
- // https: false,
- // path: "/",
- // });
- // return domain;
-};
-
export const generateWildcardDomain = (
appName: string,
serverDomain: string,
diff --git a/apps/dokploy/server/utils/docker/domain.ts b/apps/dokploy/server/utils/docker/domain.ts
index f590c5b48..924a9e8e2 100644
--- a/apps/dokploy/server/utils/docker/domain.ts
+++ b/apps/dokploy/server/utils/docker/domain.ts
@@ -84,7 +84,7 @@ export const addDomainToCompose = async (
const { appName } = compose;
const result = await loadDockerCompose(compose);
- if (!result) {
+ if (!result || domains.length === 0) {
return null;
}