version: '3.8'

services:
  op-geth-minato:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:v1.101503.1
    entrypoint: >
      geth --datadir=/data/optimism --http --http.corsdomain=* --http.vhosts=* 
      --http.addr=0.0.0.0 --http.api=web3,debug,eth,txpool,net,engine --ws 
      --ws.addr=0.0.0.0 --ws.port=8546 --ws.origins=* --ws.api=debug,eth,txpool,net,engine 
      --syncmode=full --gcmode=archive --maxpeers=100 --authrpc.vhosts=* 
      --authrpc.addr=0.0.0.0 --authrpc.port=8551 --authrpc.jwtsecret=/etc/optimism/jwt.txt --metrics 
      --metrics.addr=0.0.0.0 --metrics.expensive --metrics.port=6060 
      --rollup.disabletxpoolgossip=false --rpc.allow-unprotected-txs=true --db.engine=pebble --state.scheme=hash 
      --port=30303 
      --bootnodes=enode://6526c348274c54e7b4184014741897eb25e12ca388f588b0265bb2246caeea87ed5fcb2d55b7b08a90cd271a53bc76decb6d1ec37f219dbe4cd3ed53a888118b@52.193.245.92:30303,enode://34f172c255b11f64828d73c90a60395691e89782639423d434385594dd38b434ddffb78ad411da6fd37cbda6d0f93e17ceae399ac4f2594b0d54eb8c83c27de9@52.68.233.192:30303
      --op-network=soneium-minato-sepolia
    ports:
      - "8551:8551"
      - "6060:6060"
      - "8545:8545"
      - "8546:8546"
      - "30303:30303" 
    volumes:
      - op-geth-storage:/data/optimism
      - ./jwt.txt:/etc/optimism/jwt.txt
      - op-secrets:/etc/minato/secrets
    networks:
      - minato

  op-node-minato:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.12.2
    environment:
      - L1_URL
      - L2_URL
      - RPC_ADDR
      - RPC_PORT
      - L2_JWT_SECRET
      - L1_TRUST_RPC
      - L1_BEACON
      - SYNC_MODE
      - L1_RPC_KIND
      - OP_NODE_STATIC_PEERS
      - P2P_PRIV_PATH
      - P2P_DISCOVERY_PATH
      - P2P_PEERSTORE_PATH
      - P2P_ADVERTISE_IP
      - OP_NODE_P2P_PEER_BANNING
      - METRICS_ENABLED
      - METRICS_PORT
    command: >
      op-node --l1=${L1_URL} --l2=${L2_URL} --rpc.addr=${RPC_ADDR} --rpc.port=${RPC_PORT}
      --l2.jwt-secret=${L2_JWT_SECRET} --l1.trustrpc=${L1_TRUST_RPC} --l1.beacon=${L1_BEACON}
      --syncmode=${SYNC_MODE} --l1.rpckind=${L1_RPC_KIND} --p2p.static=${OP_NODE_STATIC_PEERS}
      --p2p.priv.path=${P2P_PRIV_PATH} --p2p.discovery.path=${P2P_DISCOVERY_PATH} 
      --p2p.peerstore.path=${P2P_PEERSTORE_PATH} --metrics.enabled=${METRICS_ENABLED}
      --p2p.ban.peers=${OP_NODE_P2P_PEER_BANNING}
      --p2p.bootnodes=enr:-J24QMURlYGuLFCYQrA1YBg1l-y8BZAjtRSh8bJug3pkNkqOCBMMbTAo6xPLge-w9Oy31KOlrHZ9CSxWHlQ_ny_cSZ6GAZF5HPjtgmlkgnY0gmlwhDTB9VyHb3BzdGFja4OaDwCJc2VjcDI1NmsxoQOk1QANdV45CtjmbnqG72RUuR_c8aT7bDwNreMRHTPLp4N0Y3CCJAaDdWRwgo_p,enr:-J24QJwOeG7uCOBn6JJF3vPIQSTaMyyAlHawVMvz44mgtryyW39CaI5mSDh65MX16PItF2Sg-Yv9I-ObDemR2Qn3a-yGAZF5Pn4NgmlkgnY0gmlwhDRE6cCHb3BzdGFja4OaDwCJc2VjcDI1NmsxoQJyDu9Izw_A3pgqKicw5xyYPgVvQAgYB-eUUfN8f7FLhIN0Y3CCJAaDdWRwgqVe
      --metrics.port=${METRICS_PORT}
      --network=soneium-minato-sepolia
    ports:
      - "9545:9545"
      - "7310:7310"
      - "9222:9222"
    volumes:
      - op-node-storage:/data/optimism
      - ./jwt.txt:/etc/optimism/jwt.txt
      - op-secrets:/etc/minato/secrets
    networks:
      - minato

volumes:
  op-geth-storage:
  op-node-storage:
  op-secrets:

networks:
  minato:
    driver: bridge

