testing changes

This commit is contained in:
Lucas Manchine
2025-08-06 14:55:30 -03:00
parent 825a1fc495
commit 8ea64f9de1
6 changed files with 36 additions and 15 deletions

View File

@@ -1,5 +1,6 @@
import { relations } from "drizzle-orm";
import {
bigint,
boolean,
integer,
json,
@@ -162,7 +163,7 @@ export const applications = pgTable("application", {
modeSwarm: json("modeSwarm").$type<ServiceModeSwarm>(),
labelsSwarm: json("labelsSwarm").$type<LabelsSwarm>(),
networkSwarm: json("networkSwarm").$type<NetworkSwarm[]>(),
stopGracePeriodSwarm: text("stopGracePeriodSwarm"),
stopGracePeriodSwarm: bigint("stopGracePeriodSwarm", { mode: "bigint" }),
//
replicas: integer("replicas").default(1).notNull(),
applicationStatus: applicationStatus("applicationStatus")
@@ -310,7 +311,7 @@ const createSchema = createInsertSchema(applications, {
previewRequireCollaboratorPermissions: z.boolean().optional(),
watchPaths: z.array(z.string()).optional(),
cleanCache: z.boolean().optional(),
stopGracePeriodSwarm: z.string().nullable(),
stopGracePeriodSwarm: z.bigint().nullable(),
});
export const apiCreateApplication = createSchema.pick({

View File

@@ -142,6 +142,7 @@ export const mechanizeDockerContainer = async (
RollbackConfig,
UpdateConfig,
Networks,
StopGracePeriod,
} = generateConfigContainer(application);
const bindsMount = generateBindMounts(mounts);
@@ -190,6 +191,7 @@ export const mechanizeDockerContainer = async (
})),
},
UpdateConfig,
...(StopGracePeriod && { StopGracePeriod }),
};
try {

View File

@@ -414,7 +414,7 @@ export const generateConfigContainer = (
},
}),
...(stopGracePeriodSwarm && {
StopGracePeriod: parseInt(stopGracePeriodSwarm, 10),
StopGracePeriod: stopGracePeriodSwarm,
}),
...(networkSwarm
? {