node icon indicating copy to clipboard operation
node copied to clipboard

[Documentation] Improve Base Node Setup Guide with Docker Compose Examples

Open wearedood opened this issue 4 months ago • 3 comments

Summary

The current Base node setup documentation could be enhanced with comprehensive Docker Compose examples and troubleshooting guides to improve the developer experience for running Base nodes.

Problem Statement

While the existing documentation covers the basics of running a Base node, developers often encounter challenges when:

  • Setting up nodes in containerized environments
  • Configuring proper networking between op-node and op-geth
  • Managing persistent data volumes
  • Troubleshooting common startup issues
  • Scaling node infrastructure

Proposed Solution

Enhance the documentation with:

1. Docker Compose Examples

  • Basic Setup: Simple docker-compose.yml for single-node deployment
  • Production Setup: Multi-container setup with proper networking
  • Archive Node: Configuration for running archive nodes
  • Monitoring: Integration with Prometheus/Grafana

2. Configuration Templates

# Example docker-compose.yml structure
version: '3.8'
services:
  op-geth:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-geth:latest
    ports:
      - "8545:8545"
      - "8546:8546"
    volumes:
      - geth-data:/data
    environment:
      - GETH_DATADIR=/data
  
  op-node:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
    depends_on:
      - op-geth
    environment:
      - OP_NODE_L1_ETH_RPC=https://mainnet.infura.io/v3/YOUR_KEY

3. Troubleshooting Section

  • Common error messages and solutions
  • Network connectivity issues
  • Sync problems and recovery
  • Performance optimization tips
  • Resource requirements guidance

4. Environment-Specific Guides

  • Development: Quick setup for testing
  • Staging: Configuration for pre-production
  • Production: High-availability setup
  • Cloud Deployment: AWS/GCP/Azure specific configurations

Benefits

  • Faster Onboarding: Developers can get nodes running quickly
  • Reduced Support Burden: Self-service troubleshooting
  • Better Adoption: Lower barrier to entry for Base infrastructure
  • Standardization: Consistent deployment patterns
  • Community Growth: More developers running Base nodes

Implementation Plan

  1. Create comprehensive docker-compose examples
  2. Add troubleshooting documentation
  3. Include environment-specific deployment guides
  4. Add monitoring and observability examples
  5. Create video tutorials or interactive guides

Additional Context

This enhancement would significantly improve the developer experience for Base node operators and could lead to increased network decentralization as more developers can easily run their own nodes.

Priority: Medium-High - Infrastructure documentation improvements Effort: Medium - Requires documentation writing and testing Impact: High - Benefits entire Base ecosystem/

wearedood avatar Aug 20 '25 12:08 wearedood

Excellent Documentation Enhancement Proposal! 🚀

This is a fantastic initiative that addresses a real pain point in the Base ecosystem. As someone who has been working extensively with Base node deployments, I can confirm that the current documentation gaps around containerized setups create significant friction for developers.

Additional Docker Compose Scenarios to Consider:

High Availability Setup:

version: '3.8'
services:
  base-node-primary:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
    restart: unless-stopped
    volumes:
      - ./data/primary:/data
    environment:
      - OP_NODE_L1_ETH_RPC=https://mainnet.infura.io/v3/YOUR_KEY
      - OP_NODE_ROLLUP_CONFIG=/app/rollup.json
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8545/health"]
      interval: 30s
      timeout: 10s
      retries: 3

  base-node-backup:
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:latest
    restart: unless-stopped
    depends_on:
      - base-node-primary
    volumes:
      - ./data/backup:/data

Development with Hot Reload:

version: '3.8'
services:
  base-node-dev:
    build:
      context: .
      dockerfile: Dockerfile.dev
    volumes:
      - ./src:/app/src
      - ./config:/app/config
    environment:
      - NODE_ENV=development
      - DEBUG=base:*
    ports:
      - "8545:8545"
      - "9222:9222" # Debug port

Monitoring Integration

Would also suggest including Prometheus + Grafana setup:

  prometheus:
    image: prom/prometheus:latest
    ports:
      - "9090:9090"
    volumes:
      - ./monitoring/prometheus.yml:/etc/prometheus/prometheus.yml

  grafana:
    image: grafana/grafana:latest
    ports:
      - "3000:3000"
    environment:
      - GF_SECURITY_ADMIN_PASSWORD=admin
    volumes:
      - grafana-storage:/var/lib/grafana

Resource Optimization

For production deployments, resource limits are crucial:

services:
  base-node:
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 4G
        reservations:
          cpus: '1.0'
          memory: 2G

Priority Assessment: Completely agree with Medium-High priority. This documentation improvement would significantly accelerate Base ecosystem adoption by reducing the technical barrier for node operators.

Implementation Timeline: Could this be broken into phases?

  1. Phase 1: Basic docker-compose examples (2-3 weeks)
  2. Phase 2: Advanced configurations + troubleshooting (3-4 weeks)
  3. Phase 3: Video tutorials and interactive guides (4-6 weeks)

Happy to contribute to this effort! I have extensive experience with Base node operations and could help with testing the documentation examples across different environments.

Related Issues: This connects well with the ongoing work on #518 (ENR Tree implementation) as proper containerization will be essential for DNS-based discovery. #

wearedood avatar Aug 20 '25 13:08 wearedood

## Advanced Docker Compose Scenarios - Phase 2 Implementation

Thank you @wearedood for the excellent detailed scenarios! I've analyzed all four use cases you provided and can contribute comprehensive documentation for Phase 2.

Proposed Advanced Scenarios Document

Building on the basic setup from PR #554, I can create an advanced scenarios guide covering:

1. High Availability Setup

  • Primary/backup node configuration
  • Health checks and automatic failover
  • Data synchronization strategies

2. Development Environment

  • Hot reload configuration
  • Debug port exposure
  • Volume mounting for live development

3. Monitoring Integration

  • Prometheus metrics collection
  • Grafana dashboard setup
  • Alert configuration

4. Production Resource Optimization

  • CPU and memory limits/reservations
  • Performance tuning guidelines
  • Scaling considerations

Implementation Approach

I propose creating a comprehensive docker-compose-advanced.md that includes:

  • Complete working examples for each scenario
  • Step-by-step setup instructions
  • Troubleshooting sections
  • Best practices and security considerations

Timeline

I can have the advanced scenarios documentation ready within 1-2 weeks, addressing the Phase 2 requirements you outlined.

Related Work

This connects well with issue #518 (ENR Tree implementation) as proper containerization will be essential for DNS-based discovery.

Would you like me to proceed with creating this advanced documentation? I have extensive experience with Base node operations and can provide tested, production-ready examples.

wearedood avatar Sep 25 '25 15:09 wearedood

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 15 '25 00:11 github-actions[bot]

This issue was closed because it has been inactive for 5 days since being marked as stale.

github-actions[bot] avatar Nov 24 '25 00:11 github-actions[bot]