diff --git a/.changeset/wild-gorillas-decide.md b/.changeset/wild-gorillas-decide.md new file mode 100644 index 00000000..ad949ded --- /dev/null +++ b/.changeset/wild-gorillas-decide.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": patch +--- + +use cartesi as compose project name diff --git a/apps/cli/src/commands/run.ts b/apps/cli/src/commands/run.ts index fc07c08d..a08513bb 100644 --- a/apps/cli/src/commands/run.ts +++ b/apps/cli/src/commands/run.ts @@ -40,21 +40,6 @@ export default class Run extends BaseCommand { public async run(): Promise { const { flags } = await this.parse(Run); - let projectName: string; - - if (flags["no-backend"]) { - projectName = "cartesi-node"; - } else { - // get machine hash - const hash = this.getMachineHash(); - // Check if snapshot exists - if (!hash) { - throw new Error( - `Cartesi machine snapshot not found, run '${this.config.bin} build'`, - ); - } - projectName = hash.substring(2, 10); - } // path of the tool instalation const binPath = path.join( @@ -83,8 +68,11 @@ export default class Run extends BaseCommand { CARTESI_LISTEN_PORT: listenPort.toString(), }; + // cartesi + const composeFiles = ["docker-compose-cartesi.yaml"]; + // validator - const composeFiles = ["docker-compose-validator.yaml"]; + composeFiles.push("docker-compose-validator.yaml"); // prompt composeFiles.push("docker-compose-prompt.yaml"); @@ -119,14 +107,7 @@ export default class Run extends BaseCommand { .map((f) => ["--file", path.join(binPath, "node", f)]) .flat(); - const compose_args = [ - "compose", - ...files, - "--project-directory", - ".", - "--project-name", - projectName, - ]; + const compose_args = ["compose", ...files, "--project-directory", "."]; const up_args = []; diff --git a/apps/cli/src/node/docker-compose-cartesi.yaml b/apps/cli/src/node/docker-compose-cartesi.yaml new file mode 100644 index 00000000..241be776 --- /dev/null +++ b/apps/cli/src/node/docker-compose-cartesi.yaml @@ -0,0 +1 @@ +name: cartesi