# Testnet is UNSTABLE. Use at your own risk. services: snapchain: image: farcasterxyz/snapchain:latest pull_policy: always # build: # For testing # context: . # dockerfile: Dockerfile init: true # Auto-reap zombie processes and forward process signals environment: RUST_BACKTRACE: "full" # Onchain-config controls. On by default — set ONCHAIN_CONFIG_ENABLED=false # to opt out and make the config written below win verbatim. Declared here # (not only interpolated inside the entrypoint text) so both override # paths work: export in the host shell / .env, or set the values directly # on these lines. Interpolating ${VAR:-} in the entrypoint alone would # bake an empty assignment at compose-parse time that silently overrides # an environment: entry. ONCHAIN_CONFIG_ENABLED: "${ONCHAIN_CONFIG_ENABLED:-}" ONCHAIN_CONFIG_REGISTRY: "${ONCHAIN_CONFIG_REGISTRY:-}" # The testnet registry lives on Sepolia, and the node's l1_rpc_url must # stay on Ethereum mainnet (ENS username proofs), so the pull needs its # own endpoint. Defaults to a public one so default-on works out of the # box; validators should override with an endpoint they trust — whoever # answers these reads decides which config document this node sees. ONCHAIN_CONFIG_RPC_URL: "${ONCHAIN_CONFIG_RPC_URL:-https://ethereum-sepolia-rpc.publicnode.com}" # Validators whose bootstrap peers are private addresses the registry's # public list can't carry (e.g. VPC-internal) set this to true to keep a # non-empty local gossip.bootstrap_peers through the merge; # validator_sets and direct_peers stay registry-managed either way. ONCHAIN_CONFIG_ACCEPT_LOCAL_BOOTSTRAP_PEERS: "${ONCHAIN_CONFIG_ACCEPT_LOCAL_BOOTSTRAP_PEERS:-}" entrypoint: - "/bin/bash" - "-c" - | #!/bin/bash cat > config.toml <&2 exit 1 fi exec $0 $@ # Now run the original command command: [ "./snapchain", "--config-path", "config.toml" ] # The onchain-config watcher applies a config change by TERMing PID 1 and # relying on this policy to re-run the entrypoint; without it a validator # exits cleanly on the first version bump and stays down. Also retries a # refused boot (apply-onchain-config.sh exits nonzero) until fixed. restart: always ports: - "3381:3381/tcp" - "3382:3382/udp" - "3383:3383/tcp" volumes: - .rocks.testnet:/app/.rocks.testnet - .onchain-config:/app/.onchain-config networks: - snapchain ulimits: nofile: soft: 65535 hard: 65535 # Start this if you want perf metrics for your hubble node. Remember to start `grafana` as well. statsd: image: graphiteapp/graphite-statsd:1.1.10-5 restart: unless-stopped healthcheck: test: ["CMD", "nc", "-zv", "localhost", "8126"] interval: 30s timeout: 5s retries: 3 start_period: 1m ports: # - '80:80' # Graphite web # - '2003:2003' # Carbon line receiver # - '2004:2004' # Carbon pickle receiver # - '7002:7002' # Carbon cache query - '${STATSD_PUBLISH:-8125}:8125/udp' # StatsD - '${STATSD_ADMIN_PUBLISH:-8126}:8126' # StatsD admin networks: - snapchain # Start this if you want to see perf metrics for your hubble node. Remember to start `statsd` as well. grafana: image: grafana/grafana:10.0.3 restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "localhost:3000/api/health"] interval: 30s timeout: 5s retries: 3 start_period: 1m # Mount the grafana config file volumes: - ./grafana/grafana.ini:/etc/grafana/grafana.ini - ./grafana/data:/var/lib/grafana # Persistent Grafana data ports: - '3000:3000' # Grafana web networks: - snapchain networks: snapchain: driver: bridge