forked from solana-labs/solana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update b script (solana-labs#27)
- Loading branch information
1 parent
449779d
commit 2b6a761
Showing
5 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,57 @@ | ||
#!/usr/bin/env sh | ||
# Build the relayer container | ||
set -e | ||
|
||
# dev or testnet | ||
ENV=$1 | ||
ENV_FILE=./env/.env.${ENV} | ||
|
||
TAG=$(git describe --match=NeVeRmAtCh --always --abbrev=8 --dirty) | ||
ORG="jitolabs" | ||
|
||
if [ -f "$ENV_FILE" ]; then | ||
export $(cat "$ENV_FILE" | grep -v '#' | awk '/=/ {print $1}') | ||
else | ||
echo "Missing .env file" | ||
exit 0 | ||
fi | ||
|
||
# A little hacky, but .env files can't execute so this is the best we have for now | ||
if [ "$ENV" = "dev" ]; then | ||
if [ "$(uname)" = "Darwin" ]; then | ||
RPC_SERVERS=http://docker.for.mac.localhost:8899 | ||
WEBSOCKET_SERVERS=ws://docker.for.mac.localhost:8900 | ||
BLOCK_ENGINE_AUTH_SERVICE_URL=http://docker.for.mac.localhost:${BLOCK_ENGINE_AUTH_SERVICE_PORT} | ||
BLOCK_ENGINE_URL=http://docker.for.mac.localhost:${BLOCK_ENGINE_PORT} | ||
elif [ "$(expr substr $(uname -s) 1 5)" = "Linux" ]; then | ||
RPC_SERVERS=http://172.17.0.1:8899 | ||
WEBSOCKET_SERVERS=ws://172.17.0.1:8900 | ||
BLOCK_ENGINE_AUTH_SERVICE_URL=http://172.17.0.1:${BLOCK_ENGINE_AUTH_SERVICE_PORT} | ||
BLOCK_ENGINE_URL=http://172.17.0.1:${BLOCK_ENGINE_PORT} | ||
else | ||
echo "unsupported testing platform, exiting" | ||
exit 1 | ||
fi | ||
elif [ "$ENV" != "mainnet" ] && [ "$ENV" != "testnet" ]; then | ||
echo "ERROR: must run ./b [dev | testnet | mainnet]" | ||
exit 2 | ||
fi | ||
|
||
COMPOSE_DOCKER_CLI_BUILD=1 \ | ||
DOCKER_BUILDKIT=1 \ | ||
RPC_SERVERS="${RPC_SERVERS}" \ | ||
WEBSOCKET_SERVERS="${WEBSOCKET_SERVERS}" \ | ||
BLOCK_ENGINE_URL="${BLOCK_ENGINE_URL}" \ | ||
BLOCK_ENGINE_AUTH_SERVICE_URL="${BLOCK_ENGINE_AUTH_SERVICE_URL}" \ | ||
TAG="${TAG}" \ | ||
ORG="${ORG}" \ | ||
docker compose --env-file ./env/.env.dev build --progress=plain | ||
docker compose --env-file "${ENV_FILE}" build --progress=plain | ||
|
||
COMPOSE_DOCKER_CLI_BUILD=1 \ | ||
DOCKER_BUILDKIT=1 \ | ||
RPC_SERVERS="${RPC_SERVERS}" \ | ||
WEBSOCKET_SERVERS="${WEBSOCKET_SERVERS}" \ | ||
BLOCK_ENGINE_URL="${BLOCK_ENGINE_URL}" \ | ||
BLOCK_ENGINE_AUTH_SERVICE_URL="${BLOCK_ENGINE_AUTH_SERVICE_URL}" \ | ||
TAG="${TAG}" \ | ||
ORG="${ORG}" \ | ||
docker compose --env-file ./env/.env.dev up --remove-orphans | ||
docker compose --env-file "${ENV_FILE}" up --remove-orphans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
TPU_PORT=8005 | ||
TPU_FWD_PORT=8006 | ||
TPU_QUIC_PORT=8011 | ||
TPU_QUIC_FWD_PORT=8012 | ||
GRPC_BIND_PORT=42069 | ||
SIGNING_KEY_PEM_PATH=/etc/keys/signing_key.pem | ||
VERIFYING_KEY_PEM_PATH=/etc/keys/verifying_key.pem | ||
BLOCK_ENGINE_URL=http://145.40.64.176:3000 | ||
BLOCK_ENGINE_AUTH_SERVICE_URL=http://136.144.58.40:14444 | ||
RPC_SERVERS=http://147.28.143.217:8899 | ||
WEBSOCKET_SERVERS=ws://147.28.143.217:8900 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters