Skip to content

Commit 4f57851

Browse files
authored
Merge pull request #3570 from Dokploy/canary
🚀 Release v0.26.7
2 parents 1e57d48 + fa201a5 commit 4f57851

47 files changed

Lines changed: 14958 additions & 124 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Dockerfile.schedule

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ COPY --from=build /prod/schedules/dist ./dist
3535
COPY --from=build /prod/schedules/package.json ./package.json
3636
COPY --from=build /prod/schedules/node_modules ./node_modules
3737

38-
CMD HOSTNAME=0.0.0.0 && pnpm start
38+
ENV HOSTNAME=0.0.0.0
39+
CMD ["pnpm", "start"]

Dockerfile.server

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ COPY --from=build /prod/api/dist ./dist
3535
COPY --from=build /prod/api/package.json ./package.json
3636
COPY --from=build /prod/api/node_modules ./node_modules
3737

38-
CMD HOSTNAME=0.0.0.0 && pnpm start
38+
ENV HOSTNAME=0.0.0.0
39+
CMD ["pnpm", "start"]

apps/dokploy/__test__/drop/drop.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const baseApp: ApplicationNested = {
2929
applicationId: "",
3030
previewLabels: [],
3131
createEnvFile: true,
32+
bitbucketRepositorySlug: "",
3233
herokuVersion: "",
3334
giteaBranch: "",
3435
buildServerId: "",

apps/dokploy/__test__/traefik/traefik.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const baseApp: ApplicationNested = {
88
applicationId: "",
99
previewLabels: [],
1010
createEnvFile: true,
11+
bitbucketRepositorySlug: "",
1112
herokuVersion: "",
1213
giteaRepository: "",
1314
giteaOwner: "",

apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/health-check-form.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ interface HealthCheckFormProps {
3131

3232
export const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {
3333
const [isLoading, setIsLoading] = useState(false);
34-
const [testCommands, setTestCommands] = useState<string[]>([]);
3534

3635
const queryMap = {
3736
postgres: () =>
@@ -72,6 +71,8 @@ export const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {
7271
},
7372
});
7473

74+
const testCommands = form.watch("Test") || [];
75+
7576
useEffect(() => {
7677
if (data?.healthCheckSwarm) {
7778
const hc = data.healthCheckSwarm;
@@ -82,7 +83,6 @@ export const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {
8283
StartPeriod: hc.StartPeriod,
8384
Retries: hc.Retries,
8485
});
85-
setTestCommands(hc.Test || []);
8686
}
8787
}, [data, form]);
8888

@@ -117,17 +117,20 @@ export const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {
117117
};
118118

119119
const addTestCommand = () => {
120-
setTestCommands([...testCommands, ""]);
120+
form.setValue("Test", [...testCommands, ""]);
121121
};
122122

123123
const updateTestCommand = (index: number, value: string) => {
124124
const newCommands = [...testCommands];
125125
newCommands[index] = value;
126-
setTestCommands(newCommands);
126+
form.setValue("Test", newCommands);
127127
};
128128

129129
const removeTestCommand = (index: number) => {
130-
setTestCommands(testCommands.filter((_, i) => i !== index));
130+
form.setValue(
131+
"Test",
132+
testCommands.filter((_: string, i: number) => i !== index),
133+
);
131134
};
132135

133136
return (
@@ -140,7 +143,7 @@ export const HealthCheckForm = ({ id, type }: HealthCheckFormProps) => {
140143
http://localhost:3000/health"])
141144
</FormDescription>
142145
<div className="space-y-2 mt-2">
143-
{testCommands.map((cmd, index) => (
146+
{testCommands.map((cmd: string, index: number) => (
144147
<div key={index} className="flex gap-2">
145148
<Input
146149
value={cmd}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
export { EndpointSpecForm } from "./endpoint-spec-form";
12
export { HealthCheckForm } from "./health-check-form";
2-
export { RestartPolicyForm } from "./restart-policy-form";
3+
export { LabelsForm } from "./labels-form";
4+
export { ModeForm } from "./mode-form";
35
export { PlacementForm } from "./placement-form";
4-
export { UpdateConfigForm } from "./update-config-form";
6+
export { RestartPolicyForm } from "./restart-policy-form";
57
export { RollbackConfigForm } from "./rollback-config-form";
6-
export { ModeForm } from "./mode-form";
7-
export { LabelsForm } from "./labels-form";
88
export { StopGracePeriodForm } from "./stop-grace-period-form";
9-
export { EndpointSpecForm } from "./endpoint-spec-form";
9+
export { UpdateConfigForm } from "./update-config-form";
1010
export { filterEmptyValues, hasValues } from "./utils";

apps/dokploy/components/dashboard/application/advanced/cluster/swarm-forms/placement-form.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import { Input } from "@/components/ui/input";
1717
import { api } from "@/utils/api";
1818

1919
const PreferenceSchema = z.object({
20-
Spread: z.object({
21-
SpreadDescriptor: z.string(),
22-
}),
20+
SpreadDescriptor: z.string(),
2321
});
2422

2523
const PlatformSchema = z.object({
@@ -116,7 +114,14 @@ export const PlacementForm = ({ id, type }: PlacementFormProps) => {
116114
mysqlId: id || "",
117115
mariadbId: id || "",
118116
mongoId: id || "",
119-
placementSwarm: hasAnyValue ? formData : null,
117+
placementSwarm: hasAnyValue
118+
? {
119+
...formData,
120+
Preferences: formData.Preferences?.map((p) => ({
121+
Spread: { SpreadDescriptor: p.SpreadDescriptor },
122+
})),
123+
}
124+
: null,
120125
});
121126

122127
toast.success("Placement updated successfully");

apps/dokploy/components/dashboard/application/general/generic/save-bitbucket-provider.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const BitbucketProviderSchema = z.object({
5454
.object({
5555
repo: z.string().min(1, "Repo is required"),
5656
owner: z.string().min(1, "Owner is required"),
57+
slug: z.string().optional(),
5758
})
5859
.required(),
5960
branch: z.string().min(1, "Branch is required"),
@@ -82,6 +83,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
8283
repository: {
8384
owner: "",
8485
repo: "",
86+
slug: "",
8587
},
8688
bitbucketId: "",
8789
branch: "",
@@ -114,11 +116,14 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
114116
} = api.bitbucket.getBitbucketBranches.useQuery(
115117
{
116118
owner: repository?.owner,
117-
repo: repository?.repo,
119+
repo: repository?.slug || repository?.repo || "",
118120
bitbucketId,
119121
},
120122
{
121-
enabled: !!repository?.owner && !!repository?.repo && !!bitbucketId,
123+
enabled:
124+
!!repository?.owner &&
125+
!!(repository?.slug || repository?.repo) &&
126+
!!bitbucketId,
122127
},
123128
);
124129

@@ -129,6 +134,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
129134
repository: {
130135
repo: data.bitbucketRepository || "",
131136
owner: data.bitbucketOwner || "",
137+
slug: data.bitbucketRepositorySlug || "",
132138
},
133139
buildPath: data.bitbucketBuildPath || "/",
134140
bitbucketId: data.bitbucketId || "",
@@ -142,6 +148,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
142148
await mutateAsync({
143149
bitbucketBranch: data.branch,
144150
bitbucketRepository: data.repository.repo,
151+
bitbucketRepositorySlug: data.repository.slug || data.repository.repo,
145152
bitbucketOwner: data.repository.owner,
146153
bitbucketBuildPath: data.buildPath,
147154
bitbucketId: data.bitbucketId,
@@ -181,6 +188,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
181188
form.setValue("repository", {
182189
owner: "",
183190
repo: "",
191+
slug: "",
184192
});
185193
form.setValue("branch", "");
186194
}}
@@ -217,7 +225,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
217225
<FormLabel>Repository</FormLabel>
218226
{field.value.owner && field.value.repo && (
219227
<Link
220-
href={`https://bitbucket.org/${field.value.owner}/${field.value.repo}`}
228+
href={`https://bitbucket.org/${field.value.owner}/${field.value.slug || field.value.repo}`}
221229
target="_blank"
222230
rel="noopener noreferrer"
223231
className="flex items-center gap-1 text-sm text-muted-foreground hover:text-primary"
@@ -271,6 +279,7 @@ export const SaveBitbucketProvider = ({ applicationId }: Props) => {
271279
form.setValue("repository", {
272280
owner: repo.owner.username as string,
273281
repo: repo.name,
282+
slug: repo.slug,
274283
});
275284
form.setValue("branch", "");
276285
}}

apps/dokploy/components/dashboard/compose/general/generic/save-bitbucket-provider-compose.tsx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const BitbucketProviderSchema = z.object({
5454
.object({
5555
repo: z.string().min(1, "Repo is required"),
5656
owner: z.string().min(1, "Owner is required"),
57+
slug: z.string().optional(),
5758
})
5859
.required(),
5960
branch: z.string().min(1, "Branch is required"),
@@ -82,6 +83,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
8283
repository: {
8384
owner: "",
8485
repo: "",
86+
slug: "",
8587
},
8688
bitbucketId: "",
8789
branch: "",
@@ -114,11 +116,14 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
114116
} = api.bitbucket.getBitbucketBranches.useQuery(
115117
{
116118
owner: repository?.owner,
117-
repo: repository?.repo,
119+
repo: repository?.slug || repository?.repo || "",
118120
bitbucketId,
119121
},
120122
{
121-
enabled: !!repository?.owner && !!repository?.repo && !!bitbucketId,
123+
enabled:
124+
!!repository?.owner &&
125+
!!(repository?.slug || repository?.repo) &&
126+
!!bitbucketId,
122127
},
123128
);
124129

@@ -129,6 +134,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
129134
repository: {
130135
repo: data.bitbucketRepository || "",
131136
owner: data.bitbucketOwner || "",
137+
slug: data.bitbucketRepositorySlug || "",
132138
},
133139
composePath: data.composePath,
134140
bitbucketId: data.bitbucketId || "",
@@ -142,6 +148,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
142148
await mutateAsync({
143149
bitbucketBranch: data.branch,
144150
bitbucketRepository: data.repository.repo,
151+
bitbucketRepositorySlug: data.repository.slug || data.repository.repo,
145152
bitbucketOwner: data.repository.owner,
146153
bitbucketId: data.bitbucketId,
147154
composePath: data.composePath,
@@ -183,6 +190,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
183190
form.setValue("repository", {
184191
owner: "",
185192
repo: "",
193+
slug: "",
186194
});
187195
form.setValue("branch", "");
188196
}}
@@ -219,7 +227,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
219227
<FormLabel>Repository</FormLabel>
220228
{field.value.owner && field.value.repo && (
221229
<Link
222-
href={`https://bitbucket.org/${field.value.owner}/${field.value.repo}`}
230+
href={`https://bitbucket.org/${field.value.owner}/${field.value.slug || field.value.repo}`}
223231
target="_blank"
224232
rel="noopener noreferrer"
225233
className="flex items-center gap-1 text-sm text-muted-foreground hover:text-primary"
@@ -273,6 +281,7 @@ export const SaveBitbucketProviderCompose = ({ composeId }: Props) => {
273281
form.setValue("repository", {
274282
owner: repo.owner.username as string,
275283
repo: repo.name,
284+
slug: repo.slug,
276285
});
277286
form.setValue("branch", "");
278287
}}

apps/dokploy/components/dashboard/postgres/advanced/show-custom-command.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ export const ShowCustomCommand = ({ id, type }: Props) => {
129129
<FormItem>
130130
<FormLabel>Docker Image</FormLabel>
131131
<FormControl>
132-
<Input placeholder="postgres:15" {...field} />
132+
<Input placeholder="postgres:18" {...field} />
133133
</FormControl>
134134

135135
<FormMessage />

0 commit comments

Comments
 (0)