Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions apps/dokploy/components/dashboard/project/add-compose.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ const AddComposeSchema = z.object({
.min(1, {
message: "App name is required",
})
.regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z])?$/, {
.regex(/^[a-z](?!.*--)([a-z0-9-]*[a-z0-9])?$/, {
message:
"App name supports lowercase letters, numbers, '-' and can only start and end letters, and does not support continuous '-'",
"App name supports lowercase letters, numbers, '-' and must start with a letter, end with a letter or number, and cannot contain consecutive '-'",
}),
description: z.string().optional(),
serverId: z.string().optional(),
Expand All @@ -78,9 +78,6 @@ export const AddCompose = ({ environmentId, projectName }: Props) => {
const { mutateAsync, isLoading, error, isError } =
api.compose.create.useMutation();

// Get environment data to extract projectId
const { data: environment } = api.environment.one.useQuery({ environmentId });

const hasServers = servers && servers.length > 0;
// Show dropdown logic based on cloud environment
// Cloud: show only if there are remote servers (no Dokploy option)
Expand Down