-
Notifications
You must be signed in to change notification settings - Fork 19
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?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
|
||
| export INDEXER_NETWORK_ID="Preview" | ||
|
||
|
|
||
| # Mock mode configuration | ||
| export MOCK_REGISTRATIONS_FILE="res/mock-bridge-data/default-registrations.json" | ||
|
|
||
| # Well known addresses of network that allow discovery of all other nodes. | ||
| export BOOTNODES="/dns/midnight-node-boot-01/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \ | ||
| /dns/midnight-node-boot-02/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,10 @@ | ||
| # overrides for testnet-02 | ||
| 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" | ||
|
||
|
|
||
| # Mock mode configuration | ||
| export MOCK_REGISTRATIONS_FILE="res/mock-bridge-data/testnet-02-mock.json" | ||
|
|
||
| # These are well known addresses of a network that allow you to discover all the other nodes. | ||
| export BOOTNODES="/dns/boot-node-01.testnet-02.midnight.network/tcp/30333/ws/p2p/12D3KooWMjUq13USCvQR9Y6yFzYNYgTQBLNAcmc8psAuPx2UUdnB \ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,4 +2,5 @@ | |
| /data | ||
| *.privatekey | ||
| *.password | ||
| *.secret | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we should have 1 not 3.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| ogmios_client.log | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,8 +15,74 @@ | |
|
|
||
| volumes: | ||
| midnight-data-testnet: {} | ||
| indexer-data: {} | ||
| postgres-data: {} | ||
| cardano-ipc: {} | ||
| db-sync-data: {} | ||
|
|
||
| services: | ||
| postgres: | ||
| profiles: ["cardano"] | ||
| image: postgres:15.3 | ||
| platform: linux/amd64 | ||
| container_name: db-sync-postgres | ||
| restart: unless-stopped | ||
| environment: | ||
| - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
| - POSTGRES_DB=${POSTGRES_DB} | ||
| - POSTGRES_USER=${POSTGRES_USER} | ||
| volumes: | ||
| - postgres-data:/var/lib/postgresql/data | ||
| ports: | ||
| - "${POSTGRES_PORT}:5432" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"] | ||
| interval: 5s | ||
| timeout: 5s | ||
| retries: 5 | ||
|
|
||
| cardano-node: | ||
| profiles: ["cardano"] | ||
| image: ${CARDANO_IMAGE} | ||
| platform: linux/amd64 | ||
| container_name: cardano-node | ||
| restart: unless-stopped | ||
| environment: | ||
| - NETWORK=${CARDANO_NETWORK} | ||
| - CARDANO_NODE_SOCKET_PATH=/ipc/node.socket | ||
| volumes: | ||
| - cardano-ipc:/ipc | ||
| - ${CARDANO_DATA_DIR}:/data | ||
| ports: | ||
| - "3001:3001" | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -f 127.0.0.1:12788 || exit 1"] | ||
| interval: 60s | ||
| timeout: 10s | ||
| retries: 5 | ||
|
|
||
| cardano-db-sync: | ||
| profiles: ["cardano"] | ||
| image: ghcr.io/intersectmbo/cardano-db-sync:13.6.0.4 | ||
| platform: linux/amd64 | ||
| container_name: cardano-db-sync | ||
| restart: unless-stopped | ||
| depends_on: | ||
| postgres: | ||
| condition: service_healthy | ||
| cardano-node: | ||
| condition: service_healthy | ||
| environment: | ||
| - NETWORK=${CARDANO_NETWORK} | ||
| - POSTGRES_HOST=${POSTGRES_HOST} | ||
| - POSTGRES_PORT=${POSTGRES_PORT} | ||
| - POSTGRES_DB=${POSTGRES_DB} | ||
| - POSTGRES_USER=${POSTGRES_USER} | ||
| - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} | ||
| volumes: | ||
| - cardano-ipc:/node-ipc | ||
| - db-sync-data:/var/lib/cexplorer | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have these in the other compose file: How about we just have one compose file and rely on docker compose profiles to turn sets of sevices on?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done! Everything is now in single compose.yml with profiles:
Deleted the legacy compose files as requested. Much cleaner now! |
||
| midnight-node-testnet: | ||
| container_name: midnight-node | ||
| restart: unless-stopped | ||
|
|
@@ -38,3 +104,26 @@ services: | |
| - ./data:/data | ||
| - ./envs/${CFG_PRESET}/pc-chain-config.json:/pc-chain-config.json | ||
| - midnight-data-testnet:/node | ||
|
|
||
| indexer-standalone: | ||
| profiles: ["cardano"] | ||
| container_name: indexer | ||
| restart: unless-stopped | ||
| image: ${INDEXER_IMAGE} | ||
| ports: | ||
| - "8088:8088" # GraphQL API | ||
| environment: | ||
| # v2.1.4 config structure (testnet-02, qanet) | ||
| - APP__CHAIN_INDEXER_APPLICATION__NETWORK_ID=${INDEXER_NETWORK_ID} | ||
| - APP__WALLET_INDEXER_APPLICATION__NETWORK_ID=${INDEXER_NETWORK_ID} | ||
| - APP__INFRA__API__NETWORK_ID=${INDEXER_NETWORK_ID} | ||
| # v3.x config structure (preview) | ||
| - APP__APPLICATION__NETWORK_ID=${INDEXER_NETWORK_ID} | ||
| - APP__INFRA__NODE__URL=ws://midnight-node:9944 | ||
| - APP__INFRA__STORAGE__CNN_URL=/data/indexer.sqlite | ||
| - APP__INFRA__SECRET=${INDEXER_SECRET} | ||
| depends_on: | ||
| midnight-node-testnet: | ||
| condition: service_healthy | ||
| volumes: | ||
| - indexer-data:/data | ||
Uh oh!
There was an error while loading. Please reload this page.