Skip to content

add: Dockerized mining setup#10301

Open
upbqdn wants to merge 1 commit intomainfrom
dockerize-mining
Open

add: Dockerized mining setup#10301
upbqdn wants to merge 1 commit intomainfrom
dockerize-mining

Conversation

@upbqdn
Copy link
Member

@upbqdn upbqdn commented Feb 10, 2026

Motivation

Follow-up Work

PR Checklist

  • The PR name is suitable for the release notes.
  • The PR follows the contribution guidelines.
  • The library crate changelogs are up to date.
  • The solution is tested.
  • The documentation is up to date.

networks:
- mining
restart: unless-stopped
entrypoint: >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zebra already exposes /ready and /healthy endpoints on port 8080. It might be better to leverage Docker's native health orchestration instead of the curl; similar to how we do in the Z3 stack:

zebra:
  healthcheck:
    test: ["CMD-SHELL", "curl -sf http://127.0.0.1:8080/healthy || exit 1"]
    interval: 30s
    timeout: 10s
    retries: 3
    start_period: 90s

Then s-nomp can rely on Docker to handle the wait:

s-nomp:
  depends_on:
    zebra:
      condition: service_healthy

I know this is confirming the RPC instead, but the overall goal is similar.

restart: unless-stopped
entrypoint: >
/bin/bash -c '
/app/docker-entrypoint.sh true &&
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be an actual script file (e.g., docker/mining/s-nomp-entrypoint.sh) rather than inline YAML. A script file could be linted, tested, and versioned more cleanly.

@gustavovalverde
Copy link
Member

Nit:nheqminer already uses profiles: [miner]. A consideration (doesn't need to be this PR): redis and s-nomp could also be placed behind a profiles: [mining] in the main docker/docker-compose.yml, rather than living in a separate docker/mining/ directory with its own compose file.

This would allow composing capabilities from a single file:

# Just Zebra
docker compose up -d

# Zebra + mining pool
docker compose --profile mining up -d

# Zebra + mining pool + CPU miner
docker compose --profile mining --profile miner up -d

# Zebra + observability
docker compose --profile monitoring up -d

# Everything
docker compose --profile mining --profile miner --profile monitoring up -d

This is the pattern used in Z3 for the monitoring stack and avoids duplicating the zebra service definition across multiple compose files.

Not blocking for this PR; just flagging the direction in case we'd like to start consolidating the Docker compose

@oxarbitrage oxarbitrage added do-not-merge Tells Mergify not to merge this PR and removed do-not-merge Tells Mergify not to merge this PR labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Dockerized mining setup

3 participants