Skip to content

Commit 42c2076

Browse files
authored
Merge pull request #3254 from Dokploy/canary
🚀 Release v0.26.2
2 parents 5cd7de8 + 0b45b79 commit 42c2076

File tree

21 files changed

+234
-112
lines changed

21 files changed

+234
-112
lines changed

.github/sponsors/awesome.png

2.7 KB
Loading

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ For detailed documentation, visit [docs.dokploy.com](https://docs.dokploy.com).
8080
<a href="https://www.lambdatest.com/?utm_source=dokploy&utm_medium=sponsor" target="_blank">
8181
<img src="https://www.lambdatest.com/blue-logo.png" width="450" height="100" />
8282
</a>
83-
83+
<a href="https://awesome.tools/" target="_blank">
84+
<img src=".github/sponsors/awesome.png" width="200" height="150" />
85+
</a>
8486
</div>
8587

8688
<!-- Premium Supporters 🥇 -->

apps/dokploy/components/dashboard/application/advanced/show-build-server.tsx

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,31 @@ interface Props {
3838
applicationId: string;
3939
}
4040

41-
const schema = z.object({
42-
buildServerId: z.string().min(1, "Build server is required"),
43-
buildRegistryId: z.string().min(1, "Build registry is required"),
44-
});
41+
const schema = z
42+
.object({
43+
buildServerId: z.string().optional(),
44+
buildRegistryId: z.string().optional(),
45+
})
46+
.refine(
47+
(data) => {
48+
// Both empty/none is valid
49+
const buildServerIsNone =
50+
!data.buildServerId || data.buildServerId === "none";
51+
const buildRegistryIsNone =
52+
!data.buildRegistryId || data.buildRegistryId === "none";
53+
54+
// Both should be either filled or empty
55+
if (buildServerIsNone && buildRegistryIsNone) return true;
56+
if (!buildServerIsNone && !buildRegistryIsNone) return true;
57+
58+
return false;
59+
},
60+
{
61+
message:
62+
"Both Build Server and Build Registry must be selected together, or both set to None",
63+
path: ["buildServerId"], // Show error on buildServerId field
64+
},
65+
);
4566

4667
type Schema = z.infer<typeof schema>;
4768

@@ -121,6 +142,11 @@ export const ShowBuildServer = ({ applicationId }: Props) => {
121142
container starts running.
122143
</AlertBlock>
123144

145+
<AlertBlock type="info">
146+
<strong>Note:</strong> Build Server and Build Registry must be
147+
configured together. You can either select both or set both to None.
148+
</AlertBlock>
149+
124150
{!registries || registries.length === 0 ? (
125151
<AlertBlock type="warning">
126152
You need to add at least one registry to use build servers. Please
@@ -147,7 +173,13 @@ export const ShowBuildServer = ({ applicationId }: Props) => {
147173
<FormItem>
148174
<FormLabel>Build Server</FormLabel>
149175
<Select
150-
onValueChange={field.onChange}
176+
onValueChange={(value) => {
177+
field.onChange(value);
178+
// If setting to "none", also reset build registry to "none"
179+
if (value === "none") {
180+
form.setValue("buildRegistryId", "none");
181+
}
182+
}}
151183
value={field.value || "none"}
152184
>
153185
<FormControl>
@@ -197,7 +229,13 @@ export const ShowBuildServer = ({ applicationId }: Props) => {
197229
<FormItem>
198230
<FormLabel>Build Registry</FormLabel>
199231
<Select
200-
onValueChange={field.onChange}
232+
onValueChange={(value) => {
233+
field.onChange(value);
234+
// If setting to "none", also reset build server to "none"
235+
if (value === "none") {
236+
form.setValue("buildServerId", "none");
237+
}
238+
}}
201239
value={field.value || "none"}
202240
>
203241
<FormControl>

apps/dokploy/components/dashboard/application/environment/show.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,10 @@ export const ShowEnvironment = ({ applicationId }: Props) => {
191191
<div className="space-y-0.5">
192192
<FormLabel>Create Environment File</FormLabel>
193193
<FormDescription>
194-
When enabled, an .env file will be created during the
195-
build process. Disable this if you don't want to generate
196-
an environment file.
194+
When enabled, an .env file will be created in the same
195+
directory as your Dockerfile during the build process.
196+
Disable this if you don't want to generate an environment
197+
file.
197198
</FormDescription>
198199
</div>
199200
<FormControl>

apps/dokploy/components/dashboard/projects/show.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,13 +286,17 @@ export const ShowProjects = () => {
286286
)
287287
.some(Boolean);
288288

289+
const productionEnvironment = project?.environments.find(
290+
(env) => env.isDefault,
291+
);
292+
289293
return (
290294
<div
291295
key={project.projectId}
292296
className="w-full lg:max-w-md"
293297
>
294298
<Link
295-
href={`/dashboard/project/${project.projectId}/environment/${project?.environments?.[0]?.environmentId}`}
299+
href={`/dashboard/project/${project.projectId}/environment/${productionEnvironment?.environmentId}`}
296300
>
297301
<Card className="group relative w-full h-full bg-transparent transition-colors hover:bg-border">
298302
{haveServicesWithDomains ? (

apps/dokploy/components/dashboard/settings/notifications/handle-notifications.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
369369
webhookUrl: notification.lark?.webhookUrl,
370370
name: notification.name,
371371
dockerCleanup: notification.dockerCleanup,
372+
volumeBackup: notification.volumeBackup,
372373
serverThreshold: notification.serverThreshold,
373374
});
374375
} else if (notification.notificationType === "custom") {
@@ -388,6 +389,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
388389
)
389390
: [],
390391
name: notification.name,
392+
volumeBackup: notification.volumeBackup,
391393
dockerCleanup: notification.dockerCleanup,
392394
serverThreshold: notification.serverThreshold,
393395
});
@@ -522,6 +524,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
522524
appDeploy: appDeploy,
523525
dokployRestart: dokployRestart,
524526
databaseBackup: databaseBackup,
527+
volumeBackup: volumeBackup,
525528
webhookUrl: data.webhookUrl,
526529
name: data.name,
527530
dockerCleanup: dockerCleanup,
@@ -547,6 +550,7 @@ export const HandleNotifications = ({ notificationId }: Props) => {
547550
appDeploy: appDeploy,
548551
dokployRestart: dokployRestart,
549552
databaseBackup: databaseBackup,
553+
volumeBackup: volumeBackup,
550554
endpoint: data.endpoint,
551555
headers: headersRecord,
552556
name: data.name,

apps/dokploy/components/dashboard/settings/servers/actions/show-storage-actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export const ShowStorageActions = ({ serverId }: Props) => {
173173
serverId: serverId,
174174
})
175175
.then(async () => {
176-
toast.success("Cleaned all");
176+
toast.success("Cleaning in progress... Please wait");
177177
})
178178
.catch(() => {
179179
toast.error("Error cleaning all");

apps/dokploy/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dokploy",
3-
"version": "v0.26.1",
3+
"version": "v0.26.2",
44
"private": true,
55
"license": "Apache-2.0",
66
"type": "module",
@@ -13,7 +13,6 @@
1313
"reset-password": "node -r dotenv/config dist/reset-password.mjs",
1414
"reset-2fa": "node -r dotenv/config dist/reset-2fa.mjs",
1515
"dev": "tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json ",
16-
"dev-turbopack": "TURBOPACK=1 tsx -r dotenv/config ./server/server.ts --project tsconfig.server.json",
1716
"studio": "drizzle-kit studio --config ./server/db/drizzle.config.ts",
1817
"migration:generate": "drizzle-kit generate --config ./server/db/drizzle.config.ts",
1918
"migration:run": "tsx -r dotenv/config migration.ts",
@@ -118,7 +117,7 @@
118117
"lucide-react": "^0.469.0",
119118
"micromatch": "4.0.8",
120119
"nanoid": "3.3.11",
121-
"next": "^16.0.7",
120+
"next": "^16.0.10",
122121
"next-i18next": "^15.4.2",
123122
"next-themes": "^0.2.1",
124123
"nextjs-toploader": "^3.9.17",

apps/dokploy/pages/api/deploy/[refreshToken].ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,17 +242,19 @@ export default async function handler(
242242

243243
if (IS_CLOUD && application.serverId) {
244244
jobData.serverId = application.serverId;
245-
await deploy(jobData);
246-
return true;
245+
deploy(jobData).catch((error) => {
246+
console.error("Background deployment failed:", error);
247+
});
248+
} else {
249+
await myQueue.add(
250+
"deployments",
251+
{ ...jobData },
252+
{
253+
removeOnComplete: true,
254+
removeOnFail: true,
255+
},
256+
);
247257
}
248-
await myQueue.add(
249-
"deployments",
250-
{ ...jobData },
251-
{
252-
removeOnComplete: true,
253-
removeOnFail: true,
254-
},
255-
);
256258
} catch (error) {
257259
res.status(400).json({ message: "Error deploying Application", error });
258260
return;

apps/dokploy/pages/api/deploy/compose/[refreshToken].ts

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -179,17 +179,19 @@ export default async function handler(
179179

180180
if (IS_CLOUD && composeResult.serverId) {
181181
jobData.serverId = composeResult.serverId;
182-
await deploy(jobData);
183-
return true;
182+
deploy(jobData).catch((error) => {
183+
console.error("Background deployment failed:", error);
184+
});
185+
} else {
186+
await myQueue.add(
187+
"deployments",
188+
{ ...jobData },
189+
{
190+
removeOnComplete: true,
191+
removeOnFail: true,
192+
},
193+
);
184194
}
185-
await myQueue.add(
186-
"deployments",
187-
{ ...jobData },
188-
{
189-
removeOnComplete: true,
190-
removeOnFail: true,
191-
},
192-
);
193195
} catch (error) {
194196
res.status(400).json({ message: "Error deploying Compose", error });
195197
return;

0 commit comments

Comments
 (0)