Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,45 @@ services:
context: .
dockerfile: ${CLIENT:-geth}/Dockerfile
ports:
- "8545:8545" # RPC
- "8546:8546" # websocket
- "7301:6060" # metrics
- "30303:30303" # P2P TCP
- "8545:8545" # RPC (⚠️ restrict to localhost in production)
- "8546:8546" # WebSocket (same caution as RPC)
- "7301:6060" # Metrics (should be internal only)
- "30303:30303" # P2P TCP
- "30303:30303/udp" # P2P UDP
command: ["bash", "./execution-entrypoint"]
volumes:
- ${HOST_DATA_DIR}:/data
- ${HOST_DATA_DIR}:/data:rw # explicitly mark as read-write
environment:
- NODE_TYPE=${NODE_TYPE:-vanilla}
env_file:
- ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet
- ${NETWORK_ENV:-.env.mainnet}
restart: unless-stopped # ensure container auto-restarts on failure
healthcheck: # basic healthcheck for service monitoring
test: ["CMD", "curl", "-f", "http://localhost:8545"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s

node:
build:
context: .
dockerfile: ${CLIENT:-geth}/Dockerfile
depends_on:
- execution
ports:
- "7545:8545" # RPC
- "9222:9222" # P2P TCP
- "9222:9222/udp" # P2P UDP
- "7300:7300" # metrics
- "6060:6060" # pprof
- "7545:8545" # RPC (⚠️ restrict to localhost in production)
- "9222:9222" # P2P TCP
- "9222:9222/udp" # P2P UDP
- "7300:7300" # Metrics (should be internal only)
- "6060:6060" # pprof (⚠️ sensitive debugging info)
command: ["bash", "./op-node-entrypoint"]
env_file:
- ${NETWORK_ENV:-.env.mainnet} # Use .env.mainnet by default, override with .env.sepolia for testnet
- ${NETWORK_ENV:-.env.mainnet}
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7545"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s