Skip to content

Commit 2bbe451

Browse files
christos-hndr-ds
authored andcommitted
Docker validator has 4 shards. (#2672)
* Docker validator has 4 shards * Docker workflow should run when docker-compose.yml changes.
1 parent 820010d commit 2bbe451

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.github/workflows/docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
- "**"
99
paths:
1010
- 'docker/Dockerfile'
11+
- 'docker/docker-compose.yml'
1112
- 'docker/compose.sh'
1213
- 'docker/docker-compose.yml'
1314
- 'Cargo.toml'
@@ -74,4 +75,3 @@ jobs:
7475
timeout_minutes: 2
7576
retry_wait_seconds: 10
7677
command: linera --wallet docker/wallet.json --storage rocksdb:docker/linera.db sync-balance
77-

configuration/compose/validator.toml

+20-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,25 @@ Grpc = "ClearText"
1616
Grpc = "ClearText"
1717

1818
[[shards]]
19-
host = "shard"
19+
host = "docker-shard-1"
2020
port = 19100
21-
metrics_host = "shard"
21+
metrics_host = "docker-shard-1"
22+
metrics_port = 21100
23+
24+
[[shards]]
25+
host = "docker-shard-2"
26+
port = 19100
27+
metrics_host = "docker-shard-2"
28+
metrics_port = 21100
29+
30+
[[shards]]
31+
host = "docker-shard-3"
32+
port = 19100
33+
metrics_host = "docker-shard-3"
34+
metrics_port = 21100
35+
36+
[[shards]]
37+
host = "docker-shard-4"
38+
port = 19100
39+
metrics_host = "docker-shard-4"
2240
metrics_port = 21100

docker/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ services:
2323
- linera-shared:/shared
2424
shard:
2525
image: linera
26-
container_name: shard
26+
deploy:
27+
replicas: 4
2728
command: [ "./compose-server-entrypoint.sh" ]
2829
volumes:
2930
- .:/config

0 commit comments

Comments
 (0)