forked from fuzzland/cached-eth-rpc
-
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.
create entrypoint script for secrets compatibility
- Loading branch information
Showing
2 changed files
with
18 additions
and
3 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
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,17 @@ | ||
#!/bin/sh | ||
|
||
# Ensure the script exits if any command fails | ||
set -e | ||
|
||
# Check if required environment variables are set | ||
if [ -z "$ETH_SEPOLIA" ] || [ -z "$OP_SEPOLIA" ] || [ -z "$BASE_SEPOLIA" ]; then | ||
echo "Error: One or more required environment variables are not set." | ||
echo "Please set ETH_SEPOLIA, OP_SEPOLIA, and BASE_SEPOLIA." | ||
exit 1 | ||
fi | ||
|
||
# Run the cached-eth-rpc command with environment variables | ||
exec /app/cached-eth-rpc --bind 0.0.0.0 --port 8080 \ | ||
--endpoint=eth-sepolia="$ETH_SEPOLIA" \ | ||
--endpoint=op-sepolia="$OP_SEPOLIA" \ | ||
--endpoint=base-sepolia="$BASE_SEPOLIA" |