Skip to content

Commit

Permalink
Docker validator has 4 shards. (linera-io#2672)
Browse files Browse the repository at this point in the history
* Docker validator has 4 shards

* Docker workflow should run when docker-compose.yml changes.
  • Loading branch information
christos-h authored Oct 21, 2024
1 parent 4f128f6 commit 60e2cec
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- "**"
paths:
- 'docker/Dockerfile'
- 'docker/docker-compose.yml'
- 'docker/compose.sh'
- 'Cargo.toml'
- '.github/workflows/docker.yml'
Expand Down Expand Up @@ -59,4 +60,4 @@ jobs:
# Docker compose can take some time to start
max_attempts: 5
timeout_minutes: 2
command: sleep 60 && linera --wallet docker/wallet.json --storage rocksdb:docker/linera.db sync-balance
command: sleep 60 && linera --wallet docker/wallet.json --storage rocksdb:docker/linera.db sync-balance
22 changes: 20 additions & 2 deletions configuration/compose/validator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,25 @@ Grpc = "ClearText"
Grpc = "ClearText"

[[shards]]
host = "shard"
host = "docker-shard-1"
port = 19100
metrics_host = "shard"
metrics_host = "docker-shard-1"
metrics_port = 21100

[[shards]]
host = "docker-shard-2"
port = 19100
metrics_host = "docker-shard-2"
metrics_port = 21100

[[shards]]
host = "docker-shard-3"
port = 19100
metrics_host = "docker-shard-3"
metrics_port = 21100

[[shards]]
host = "docker-shard-4"
port = 19100
metrics_host = "docker-shard-4"
metrics_port = 21100
3 changes: 2 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ services:
- linera-shared:/shared
shard:
image: linera
container_name: shard
deploy:
replicas: 4
command: [ "./compose-server-entrypoint.sh" ]
volumes:
- .:/config
Expand Down

0 comments on commit 60e2cec

Please sign in to comment.