Skip to content

Commit

Permalink
Parameterise docker compose image (#2829)
Browse files Browse the repository at this point in the history
* Docker validator images are configurable.

* Updated deploy-validator.sh to a remote image.
  • Loading branch information
christos-h authored Nov 6, 2024
1 parent 13d17a6 commit d169df6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
- "--overprovisioned"
- "1"
proxy:
image: linera
image: "${LINERA_IMAGE:-linera}"
container_name: proxy
ports:
- "19100:19100"
Expand All @@ -23,7 +23,7 @@ services:
shard-init:
condition: service_completed_successfully
shard:
image: linera
image: "${LINERA_IMAGE:-linera}"
deploy:
replicas: 4
command: [ "./compose-server-entrypoint.sh" ]
Expand All @@ -33,7 +33,7 @@ services:
shard-init:
condition: service_completed_successfully
shard-init:
image: linera
image: "${LINERA_IMAGE:-linera}"
container_name: shard-init
command: [ "./compose-server-init.sh" ]
volumes:
Expand Down
5 changes: 1 addition & 4 deletions scripts/deploy-validator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ GENESIS_CONFIG="docker/genesis.json"
echo "Building Linera binaries"
cargo install --locked --path linera-service

# Build Docker image
echo "Building Linera docker image"
docker build --build-arg git_commit="$GIT_COMMIT" -f docker/Dockerfile . -t linera

# Create validator configuration file
echo "Creating validator configuration..."
cat > $VALIDATOR_CONFIG <<EOL
Expand Down Expand Up @@ -114,6 +110,7 @@ PUBLIC_KEY=$(linera-server generate --validators validator-config.toml)
echo "Validator setup completed successfully."
echo "Starting docker compose..."

export LINERA_IMAGE="us-docker.pkg.dev/linera-io-dev/linera-public-registry/linera:$BRANCH_NAME"
docker compose up --wait

echo "Public Key: $PUBLIC_KEY"

0 comments on commit d169df6

Please sign in to comment.