-
Notifications
You must be signed in to change notification settings - Fork 18
feat: add Preview support to midnight-node-docker (and indexer) #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add indexer-standalone service to compose.yml - Generate and manage indexer secret in .envrc - Add INDEXER_IMAGE to qanet and testnet-02 environments - Create new preview environment configuration - Update README to document indexer integration - Add indexer.secret to .gitignore
Add cardano-node and cardano-db-sync services to support midnight-node's main chain follower. Midnight-node requires access to Cardano blockchain data via PostgreSQL populated by cardano-db-sync. Services added: - cardano-node: Connects to Cardano preview network, provides blockchain data - cardano-db-sync: Syncs Cardano data to PostgreSQL (cexplorer database) Changes: - Added cardano-ipc and db-sync-data volumes for inter-service communication - Updated midnight-node-testnet to depend on cardano-db-sync - Created cardano-data/ directory for persistent node data - Set indexer APP__APPLICATION__NETWORK_ID=TestNet to match testnet-02 - Added interactions/ to .git/info/exclude Known issue - indexer version incompatibility: - Indexer 2.1.4 expects "Undeployed" network but testnet-02 uses "TestNet" - This is a version compatibility issue, not configuration - Cardano stack works correctly; indexer needs compatible version Other limitations: - Cardano sync takes significant time (hours to days for full sync) - Midnight-node shows verification errors until db-sync catches up Related: PM-20249
| @@ -0,0 +1,11 @@ | |||
| # overrides for preview | |||
| export MIDNIGHT_NODE_IMAGE="ghcr.io/midnight-ntwrk/midnight-node:0.17.0-rc.4" | |||
| export INDEXER_IMAGE="ghcr.io/midnight-ntwrk/indexer-standalone:3.0.0-alpha.5" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Node needs to publish to dockerhub for all named releases. (these referenced images aren't public)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gilescope Good catch on the ghcr.io images requiring auth. Is this blocking for the PR, or should we track it separately for the node team?
For context:
- testnet-02 already uses public Docker Hub image (midnightnetwork/midnight-node:0.12.1)
- preview/qanet use ghcr.io which needs GitHub authentication
.envrc.preview
Outdated
| # overrides for preview | ||
| export MIDNIGHT_NODE_IMAGE="ghcr.io/midnight-ntwrk/midnight-node:0.17.0-rc.4" | ||
| export INDEXER_IMAGE="ghcr.io/midnight-ntwrk/indexer-standalone:3.0.0-alpha.5" | ||
| export INDEXER_NETWORK_ID="Preview" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't the network id lowercase?
.envrc.testnet-02
Outdated
| export MIDNIGHT_NODE_IMAGE="midnightnetwork/midnight-node:0.12.0" | ||
| export MIDNIGHT_NODE_IMAGE="midnightnetwork/midnight-node:0.12.1" | ||
| export INDEXER_IMAGE="ghcr.io/midnight-ntwrk/indexer-standalone:2.1.4" | ||
| export INDEXER_NETWORK_ID="TestNet" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not TestNet-02 ? Honestly I think we should have lowercase for all these network ids.
| /data | ||
| *.privatekey | ||
| *.password | ||
| *.secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should have 1 not 3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| volumes: | ||
| - cardano-ipc:/node-ipc | ||
| - db-sync-data:/var/lib/cexplorer | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have these in the other compose file:
cardano-db-sync
cardano-node
postgres
How about we just have one compose file and rely on docker compose profiles to turn sets of sevices on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Everything is now in single compose.yml with profiles:
docker compose up→ just midnight-nodedocker compose --profile cardano up→ adds Cardano stack + indexerdocker compose --profile ogmios up→ adds Ogmiosdocker compose --profile proof-server up→ adds proof server
Deleted the legacy compose files as requested. Much cleaner now!
Co-authored-by: Squirrel <gilescope@gmail.com>
Fix critical network ID capitalization bugs (preview/qanet/testnet-02), standardize on .secret file extension for all sensitive data, consolidate all services into single compose.yml with Docker Compose profiles, and remove legacy compose files as requested.
f36794a to
21876e2
Compare
|
Preview |
|
|
Adds indexer-standalone integration to midnight-node-docker, enabling users to run both Midnight node and indexer with a single docker-compose command.
Changes
Supported Networks
Fixes PM-20249