Merge branch 'Dokploy:canary' into feature/delete-docker-volumes

This commit is contained in:
DJKnaeckebrot
2024-12-15 19:42:34 +01:00
committed by GitHub
10 changed files with 122 additions and 20 deletions

View File

@@ -317,16 +317,12 @@ export const calculateResources = ({
}: Resources): ResourceRequirements => {
return {
Limits: {
MemoryBytes: memoryLimit ? memoryLimit * 1024 * 1024 : undefined,
NanoCPUs: cpuLimit ? (cpuLimit || 1) * 1000 * 1000 * 1000 : undefined,
MemoryBytes: memoryLimit ?? undefined,
NanoCPUs: cpuLimit ?? undefined,
},
Reservations: {
MemoryBytes: memoryReservation
? (memoryReservation || 1) * 1024 * 1024
: undefined,
NanoCPUs: cpuReservation
? (cpuReservation || 1) * 1000 * 1000 * 1000
: undefined,
MemoryBytes: memoryReservation ?? undefined,
NanoCPUs: cpuReservation ?? undefined,
},
};
};