diff --git a/apps/dokploy/components/dashboard/projects/show.tsx b/apps/dokploy/components/dashboard/projects/show.tsx
index 188ee60d..b3caef7d 100644
--- a/apps/dokploy/components/dashboard/projects/show.tsx
+++ b/apps/dokploy/components/dashboard/projects/show.tsx
@@ -186,7 +186,7 @@ export const ShowProjects = () => {
target="_blank"
href={`${domain.https ? "https" : "http"}://${domain.host}${domain.path}`}
>
- {domain.host}
+ {domain.host}
@@ -222,7 +222,7 @@ export const ShowProjects = () => {
target="_blank"
href={`${domain.https ? "https" : "http"}://${domain.host}${domain.path}`}
>
- {domain.host}
+ {domain.host}
diff --git a/packages/server/src/templates/processors.ts b/packages/server/src/templates/processors.ts
index c45a8b0f..4320b4d0 100644
--- a/packages/server/src/templates/processors.ts
+++ b/packages/server/src/templates/processors.ts
@@ -175,7 +175,9 @@ export function processDomains(
variables: Record,
schema: Schema,
): Template["domains"] {
- return template.config.domains.map((domain: DomainConfig) => ({
+ if (!template?.config?.domains) return [];
+
+ return template?.config?.domains?.map((domain: DomainConfig) => ({
...domain,
host: domain.host
? processValue(domain.host, variables, schema)
@@ -191,7 +193,9 @@ export function processEnvVars(
variables: Record,
schema: Schema,
): Template["envs"] {
- return Object.entries(template.config.env).map(
+ if (!template?.config?.env) return [];
+
+ return Object.entries(template?.config?.env).map(
([key, value]: [string, string]) => {
const processedValue = processValue(value, variables, schema);
return `${key}=${processedValue}`;
@@ -207,9 +211,9 @@ export function processMounts(
variables: Record,
schema: Schema,
): Template["mounts"] {
- if (!template.config.mounts) return [];
+ if (!template?.config?.mounts) return [];
- return template.config.mounts.map((mount: MountConfig) => ({
+ return template?.config?.mounts?.map((mount: MountConfig) => ({
filePath: processValue(mount.filePath, variables, schema),
content: processValue(mount.content, variables, schema),
}));