Skip to content

Commit

Permalink
update entrypoint script and Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
dshiell committed Aug 7, 2024
1 parent ad95186 commit c0c2610
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ RUN apk update && apk add --no-cache \
# openssl?

COPY --from=builder /app/target/release/cached-eth-rpc /app/cached-eth-rpc
COPY --from=builder /app/entrypoint.sh /app/entrypoint.sh
COPY ./entrypoint.sh /app/entrypoint.sh

ENTRYPOINT [ "/app/cached-eth-rpc" ]
10 changes: 5 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
set -e

# Check if required environment variables are set
if [ -z "$ETH_SEPOLIA" ] || [ -z "$OP_SEPOLIA" ] || [ -z "$BASE_SEPOLIA" ]; then
if [ -z "$ETH_SEPOLIA_RPC" ] || [ -z "$OP_SEPOLIA_RPC" ] || [ -z "$BASE_SEPOLIA_RPC" ]; then
echo "Error: One or more required environment variables are not set."
echo "Please set ETH_SEPOLIA, OP_SEPOLIA, and BASE_SEPOLIA."
echo "Please set ETH_SEPOLIA_RPC, OP_SEPOLIA_RPC, and BASE_SEPOLIA_RPC."
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"
--endpoint=eth-sepolia="$ETH_SEPOLIA_RPC" \
--endpoint=op-sepolia="$OP_SEPOLIA_RPC" \
--endpoint=base-sepolia="$BASE_SEPOLIA_RPC"

0 comments on commit c0c2610

Please sign in to comment.