diff --git a/apps/cli/src/commands/run.ts b/apps/cli/src/commands/run.ts index fa8678b0..1b7a13ba 100644 --- a/apps/cli/src/commands/run.ts +++ b/apps/cli/src/commands/run.ts @@ -56,17 +56,13 @@ export default class Run extends BaseCommand { }), cpus: Flags.integer({ description: - "Define the number of CPUs to use (eg.: 1) for the rollups-node, 0 (zero) means unlimited", + "Define the number of CPUs to use (eg.: 1) for the rollups-node", summary: "number of cpu limits for the rollups-node", - default: 0, - min: 0, }), memory: Flags.integer({ description: - "Define the amount of memory to use for the rollups-node in MB (eg.: 1024), 0 (zero) means unlimited", + "Define the amount of memory to use for the rollups-node in MB (eg.: 1024)", summary: "memory limit for the rollups-node in MB", - default: 0, - min: 0, }), "show-config": Flags.boolean({ description: "show the docker compose configuration", @@ -118,16 +114,16 @@ export default class Run extends BaseCommand { CARTESI_SNAPSHOT_DIR: "/usr/share/rollups-node/snapshot", CARTESI_BIN_PATH: binPath, CARTESI_LISTEN_PORT: listenPort.toString(), - CARTESI_VALIDATOR_CPUS: flags.cpus.toString(), - CARTESI_VALIDATOR_MEMORY: flags.memory.toString(), + CARTESI_VALIDATOR_CPUS: flags.cpus?.toString(), + CARTESI_VALIDATOR_MEMORY: flags.memory?.toString(), }; // validator const composeFiles = ["docker-compose-validator.yaml"]; - if (flags["cpus"] > 0) { + if (flags.cpus) { composeFiles.push("docker-compose-validator-cpus.yaml"); } - if (flags["memory"] > 0) { + if (flags.memory) { composeFiles.push("docker-compose-validator-memory.yaml"); }