mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-29 11:05:33 +02:00
feat: add build server configuration to application dashboard
- Introduced a new component for configuring build servers in the application dashboard. - Implemented form validation using Zod and integrated API calls for updating build server settings. - Enhanced server and application schemas to support build server and registry associations. - Updated UI to display build server options and provide user feedback on updates.
This commit is contained in:
@@ -204,6 +204,15 @@ export const applications = pgTable("application", {
|
||||
serverId: text("serverId").references(() => server.serverId, {
|
||||
onDelete: "cascade",
|
||||
}),
|
||||
buildServerId: text("buildServerId").references(() => server.serverId, {
|
||||
onDelete: "set null",
|
||||
}),
|
||||
buildRegistryId: text("buildRegistryId").references(
|
||||
() => registry.registryId,
|
||||
{
|
||||
onDelete: "set null",
|
||||
},
|
||||
),
|
||||
});
|
||||
|
||||
export const applicationsRelations = relations(
|
||||
@@ -247,6 +256,14 @@ export const applicationsRelations = relations(
|
||||
fields: [applications.serverId],
|
||||
references: [server.serverId],
|
||||
}),
|
||||
buildServer: one(server, {
|
||||
fields: [applications.buildServerId],
|
||||
references: [server.serverId],
|
||||
}),
|
||||
buildRegistry: one(registry, {
|
||||
fields: [applications.buildRegistryId],
|
||||
references: [registry.registryId],
|
||||
}),
|
||||
previewDeployments: many(previewDeployments),
|
||||
}),
|
||||
);
|
||||
|
||||
@@ -24,6 +24,7 @@ import { schedules } from "./schedule";
|
||||
import { sshKeys } from "./ssh-key";
|
||||
import { generateAppName } from "./utils";
|
||||
export const serverStatus = pgEnum("serverStatus", ["active", "inactive"]);
|
||||
export const serverType = pgEnum("serverType", ["deploy", "build"]);
|
||||
|
||||
export const server = pgTable("server", {
|
||||
serverId: text("serverId")
|
||||
@@ -44,6 +45,7 @@ export const server = pgTable("server", {
|
||||
.notNull()
|
||||
.references(() => organization.id, { onDelete: "cascade" }),
|
||||
serverStatus: serverStatus("serverStatus").notNull().default("active"),
|
||||
serverType: serverType("serverType").notNull().default("deploy"),
|
||||
command: text("command").notNull().default(""),
|
||||
sshKeyId: text("sshKeyId").references(() => sshKeys.sshKeyId, {
|
||||
onDelete: "set null",
|
||||
@@ -131,6 +133,7 @@ export const apiCreateServer = createSchema
|
||||
port: true,
|
||||
username: true,
|
||||
sshKeyId: true,
|
||||
serverType: true,
|
||||
})
|
||||
.required();
|
||||
|
||||
@@ -155,6 +158,7 @@ export const apiUpdateServer = createSchema
|
||||
port: true,
|
||||
username: true,
|
||||
sshKeyId: true,
|
||||
serverType: true,
|
||||
})
|
||||
.required()
|
||||
.extend({
|
||||
|
||||
Reference in New Issue
Block a user