Skip to content

Commit

Permalink
chore: add docker setup for reth
Browse files Browse the repository at this point in the history
  • Loading branch information
jim380 committed Oct 30, 2024
1 parent a28c3ca commit d192f94
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Development

```bash
$ cd docker
$ docker compose up -d
$ docker compose down
```
57 changes: 57 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: "reth"

services:
jwt-init:
container_name: jwt-init
image: alpine
volumes:
- ./jwttoken:/jwt
command: >
/bin/sh -c "mkdir -p /jwt &&
if [ ! -f /jwt/jwt.hex ]; then
apk add --no-cache openssl &&
openssl rand -hex 32 | tr -d '\n' > /jwt/jwt.hex &&
echo '✅ JWT token generated successfully';
else
echo '✅ JWT token already exists';
fi"
reth:
container_name: reth
restart: unless-stopped
image: ghcr.io/paradigmxyz/reth
depends_on:
jwt-init:
condition: service_completed_successfully
ports:
- "9001:9001" # metrics
- "30303:30303" # eth/66 peering
- "8545:8545" # rpc
- "8551:8551" # engine
volumes:
- mainnet_data:/root/.local/share/reth/mainnet
- sepolia_data:/root/.local/share/reth/sepolia
- holesky_data:/root/.local/share/reth/holesky
- logs:/root/logs
- ./jwttoken:/root/jwt:ro
pid: host
command: >
node
--chain sepolia
--metrics 0.0.0.0:9001
--log.file.directory /root/logs
--authrpc.addr 0.0.0.0
--authrpc.port 8551
--authrpc.jwtsecret /root/jwt/jwt.hex
--http --http.addr 0.0.0.0 --http.port 8545
--http.api "eth,net,web3"
volumes:
mainnet_data:
driver: local
sepolia_data:
driver: local
holesky_data:
driver: local
logs:
driver: local
1 change: 1 addition & 0 deletions docker/jwttoken/jwt.hex
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dba4fde66a8c385e6e96d649ee3c651e923d283cf342d66059447e1079dc737c

0 comments on commit d192f94

Please sign in to comment.