Skip to content

Commit c4b139d

Browse files
committed
feat(cli): improve startup time
1 parent e21a997 commit c4b139d

File tree

8 files changed

+12
-27
lines changed

8 files changed

+12
-27
lines changed

.changeset/new-hotels-follow.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cartesi/cli": major
3+
---
4+
5+
improve startup time

apps/cli/src/commands/rollups/start.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const baseServices: Service[] = [
4242
{
4343
name: "rpc",
4444
file: "docker-compose-node.yaml",
45-
healthySemaphore: "proxy",
45+
healthySemaphore: "rollups-node",
4646
healthyTitle: (port) =>
4747
`${chalk.cyan("rpc")} service ready at ${chalk.cyan(`${host}:${port}/rpc`)}`,
4848
waitTitle: `${chalk.cyan("rpc")} service starting...`,
@@ -51,7 +51,7 @@ const baseServices: Service[] = [
5151
{
5252
name: "inspect",
5353
file: "docker-compose-node.yaml",
54-
healthySemaphore: "proxy",
54+
healthySemaphore: "rollups-node",
5555
healthyTitle: (port) =>
5656
`${chalk.cyan("inspect")} service ready at ${chalk.cyan(`${host}:${port}/inspect/<application_address>`)}`,
5757
waitTitle: `${chalk.cyan("inspect")} service starting...`,
@@ -63,7 +63,7 @@ const availableServices: Service[] = [
6363
{
6464
name: "bundler",
6565
file: "docker-compose-bundler.yaml",
66-
healthySemaphore: "proxy",
66+
healthySemaphore: "bundler",
6767
healthyTitle: (port) =>
6868
`${chalk.cyan("bundler")} service ready at ${chalk.cyan(`${host}:${port}/bundler/rpc`)}`,
6969
waitTitle: `${chalk.cyan("bundler")} service starting...`,
@@ -72,7 +72,7 @@ const availableServices: Service[] = [
7272
{
7373
name: "espresso",
7474
file: "docker-compose-espresso.yaml",
75-
healthySemaphore: "proxy",
75+
healthySemaphore: "espresso",
7676
healthyTitle: (port) =>
7777
`${chalk.cyan("espresso")} service ready at ${chalk.cyan(`${host}:${port}/espresso`)}`,
7878
waitTitle: `${chalk.cyan("espresso")} service starting...`,
@@ -81,7 +81,7 @@ const availableServices: Service[] = [
8181
{
8282
name: "explorer",
8383
file: "docker-compose-explorer.yaml",
84-
healthySemaphore: "proxy",
84+
healthySemaphore: "explorer_api",
8585
healthyTitle: (port) =>
8686
`${chalk.cyan("explorer")} service ready at ${chalk.cyan(`${host}:${port}/explorer`)}`,
8787
waitTitle: `${chalk.cyan("explorer")} service starting...`,
@@ -90,7 +90,7 @@ const availableServices: Service[] = [
9090
{
9191
name: "graphql",
9292
file: "docker-compose-graphql.yaml",
93-
healthySemaphore: "proxy",
93+
healthySemaphore: "graphql",
9494
healthyTitle: (port) =>
9595
`${chalk.cyan("graphql")} service ready at ${chalk.cyan(`${host}:${port}/graphql`)}`,
9696
waitTitle: `${chalk.cyan("graphql")} service starting...`,
@@ -99,7 +99,7 @@ const availableServices: Service[] = [
9999
{
100100
name: "paymaster",
101101
file: "docker-compose-paymaster.yaml",
102-
healthySemaphore: "proxy",
102+
healthySemaphore: "paymaster",
103103
healthyTitle: (port) =>
104104
`${chalk.cyan("paymaster")} service ready at ${chalk.cyan(`${host}:${port}/paymaster`)}`,
105105
waitTitle: `${chalk.cyan("paymaster")} service starting...`,

apps/cli/src/compose/rollups/docker-compose-bundler.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,5 @@ services:
3939
retries: 5
4040

4141
proxy:
42-
depends_on:
43-
bundler:
44-
condition: service_healthy
4542
volumes:
4643
- ./proxy/bundler.yaml:/etc/traefik/conf.d/bundler.yaml

apps/cli/src/compose/rollups/docker-compose-espresso.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ services:
9595
ESPRESSO_STARTING_BLOCK: 101
9696

9797
proxy:
98-
depends_on:
99-
espresso:
100-
condition: service_healthy
10198
volumes:
10299
- ./proxy/espresso.yaml:/etc/traefik/conf.d/espresso.yaml
103100
- ./proxy/espresso-reader.yaml:/etc/traefik/conf.d/espresso-reader.yaml

apps/cli/src/compose/rollups/docker-compose-explorer.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ services:
6464
condition: service_completed_successfully
6565

6666
proxy:
67-
depends_on:
68-
explorer_api:
69-
condition: service_healthy
70-
explorer:
71-
condition: service_healthy
7267
volumes:
7368
- ./proxy/explorer.yaml:/etc/traefik/conf.d/explorer.yaml
7469
- ./proxy/explorer-api.yaml:/etc/traefik/conf.d/explorer-api.yaml

apps/cli/src/compose/rollups/docker-compose-graphql.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,5 @@ services:
4545
condition: service_completed_successfully
4646

4747
proxy:
48-
depends_on:
49-
graphql:
50-
condition: service_healthy
5148
volumes:
5249
- ./proxy/graphql.yaml:/etc/traefik/conf.d/graphql.yaml

apps/cli/src/compose/rollups/docker-compose-node.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,5 @@ services:
3232
- ${CARTESI_BIN_PATH}/compose/rollups/default.env
3333

3434
proxy:
35-
depends_on:
36-
rollups-node:
37-
condition: service_healthy
3835
volumes:
3936
- ./proxy/rollups-node.yaml:/etc/traefik/conf.d/rollups-node.yaml

apps/cli/src/compose/rollups/docker-compose-paymaster.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@ services:
1414
retries: 5
1515

1616
proxy:
17-
depends_on:
18-
paymaster:
19-
condition: service_healthy
2017
volumes:
2118
- ./proxy/paymaster.yaml:/etc/traefik/conf.d/paymaster.yaml

0 commit comments

Comments
 (0)