Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Provide relayer flag only for polybft consensus in Docker script
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Oct 10, 2023
1 parent f9c39c7 commit 5b83c76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
11 changes: 1 addition & 10 deletions docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,7 @@ services:
node-1:
image: local/polygon-edge
container_name: polygon-edge-validator-1
command: [
"server",
"--data-dir", "/data/data-1",
"--chain", "/data/genesis.json",
"--grpc-address", "0.0.0.0:9632",
"--libp2p", "0.0.0.0:1478",
"--jsonrpc", "0.0.0.0:8545",
"--prometheus", "0.0.0.0:5001",
"--relayer"
]
command: [ "start-node-1", "${EDGE_CONSENSUS:-polybft}" ]
depends_on:
init:
condition: service_completed_successfully
Expand Down
17 changes: 17 additions & 0 deletions docker/local/polygon-edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,23 @@ case "$1" in
;;
esac
;;
"start-node-1")
relayer_flag=""
# Start relayer only when run in polybft
if [ "$2" == "polybft" ]; then
echo "Starting relayer..."
relayer_flag="--relayer"
fi

"$POLYGON_EDGE_BIN" server \
--data-dir /data/data-1 \
--chain /data/genesis.json \
--grpc-address 0.0.0.0:9632 \
--libp2p 0.0.0.0:1478 \
--jsonrpc 0.0.0.0:8545 \
--prometheus 0.0.0.0:5001 \
--seal $relayer_flag
;;
*)
echo "Executing polygon-edge..."
exec "$POLYGON_EDGE_BIN" "$@"
Expand Down

0 comments on commit 5b83c76

Please sign in to comment.