Skip to content

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 07d1076 commit 98ebde3
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
12 changes: 1 addition & 11 deletions docker/local/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +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",
"--seal",
"--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 98ebde3

Please sign in to comment.