From 885efee24dada53bd4f0b2c15577737ccb374752 Mon Sep 17 00:00:00 2001 From: lucsoft Date: Sun, 5 Nov 2023 22:41:24 +0100 Subject: [PATCH] Add min requirements for servers (prevents bootloops) --- spec/music.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/music.ts b/spec/music.ts index b4bd860..6a66c88 100644 --- a/spec/music.ts +++ b/spec/music.ts @@ -225,7 +225,11 @@ export const serverCreate = zod.object({ name: zod.string().min(3).max(20), type: zod.nativeEnum(ServerTypes), location, - limits, + limits: zod.object({ + memory: limits.shape.memory.min(300, "Minimum memory is 300MB"), + disk: limits.shape.disk.min(200, "Minimum disk is 200MB"), + cpu: limits.shape.cpu.min(3, "Minimum cpu is 3% of a core") + }), version: zod.string() });