Skip to content

Commit

Permalink
feat(cardano-services): sanchonet support
Browse files Browse the repository at this point in the history
- use the new custom Ogmios Dockerfile
- adds new yarn scripts to start the sanchonet services
- generated new fixtures reflecting new cardano tools version
- bump cardano-db-sync to use new image registry
  • Loading branch information
rhyslbw authored and iccicci committed Sep 28, 2023
1 parent 53a8ab0 commit 13109d6
Show file tree
Hide file tree
Showing 8 changed files with 7,083 additions and 9,870 deletions.
11 changes: 9 additions & 2 deletions compose/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ services:
timeout: 1s
retries: 120
start_period: 100ms
image: inputoutput/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.1.0.0}
image: ghcr.io/input-output-hk/cardano-db-sync:${CARDANO_DB_SYNC_VERSION:-13.1.0.2}
restart: on-failure
stop_signal: SIGINT
volumes:
Expand All @@ -135,6 +135,13 @@ services:

cardano-node-ogmios:
<<: *logging
build:
args:
CARDANO_NODE_VERSION: ${CARDANO_NODE_VERSION:-1.35.5}
NETWORK: ${NETWORK:-mainnet}
OGMIOS_VERSION: ${OGMIOS_VERSION:-v5.6.0}
context: ../../compose/ogmios
target: cardano-node-ogmios
healthcheck:
retries: 2000
ports:
Expand Down Expand Up @@ -177,7 +184,7 @@ services:
POSTGRES_DB_FILE: /run/secrets/postgres_db_db_sync
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
POSTGRES_USER_FILE: /run/secrets/postgres_user
image: postgres:${POSTGRES_VERSION:-11.5-alpine}
image: postgres:${POSTGRES_VERSION:-12.16-alpine}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
Expand Down
1 change: 0 additions & 1 deletion packages/cardano-services/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ x-logging: &logging

services:
cardano-node-ogmios:
image: cardanosolutions/cardano-node-ogmios:v${OGMIOS_VERSION:-5.6.0}_${CARDANO_NODE_VERSION:-1.35.5}-${NETWORK:-mainnet}
volumes:
- ./config/network/${NETWORK:-mainnet}:/config

Expand Down
3 changes: 3 additions & 0 deletions packages/cardano-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@
"preview:dev": "FILES='-f ../../compose/dev.yml -f dev.yml' yarn preview:up",
"preview:up": "NETWORK=preview yarn compose:up",
"preview:down": "NETWORK=preview yarn compose:down",
"sanchonet:dev": "FILES='-f ../../compose/dev.yml -f dev.yml' yarn sanchonet:up",
"sanchonet:up": "NETWORK=sanchonet OGMIOS_PORT=${OGMIOS_PORT:-1341} OGMIOS_VERSION=f40a8921906fecae4c52ffff34fb011457f9a771 CARDANO_NODE_VERSION=8.3.1-pre CARDANO_DB_SYNC_VERSION=sancho-1-1-0 yarn compose:up",
"sanchonet:down": "NETWORK=sanchonet yarn compose:down",
"test": "jest --runInBand -c ./jest.config.js",
"test:build:verify": "tsc --build ./test",
"test:debug": "DEBUG=true yarn test",
Expand Down
9,288 changes: 3,894 additions & 5,394 deletions packages/cardano-services/test/jest-setup/snapshots/db_sync.sql

Large diffs are not rendered by default.

3,821 changes: 1,568 additions & 2,253 deletions packages/cardano-services/test/jest-setup/snapshots/handle.sql

Large diffs are not rendered by default.

3,826 changes: 1,608 additions & 2,218 deletions packages/cardano-services/test/jest-setup/snapshots/stake_pool.sql

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion packages/e2e/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ services:

cardano-node-ogmios:
entrypoint: ['/tini', '-g', '--', '/scripts/cardano-node-ogmios.sh']
image: cardanosolutions/cardano-node-ogmios:v${OGMIOS_VERSION:-5.6.0}_${CARDANO_NODE_VERSION:-1.35.5}
depends_on:
local-testnet:
condition: service_healthy
Expand Down
2 changes: 1 addition & 1 deletion packages/util-dev/src/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Docker from 'dockerode';
export { Docker };
export { containerExec } from 'dockerode-utils';

const CONTAINER_IMAGE = 'postgres:11.5-alpine';
const CONTAINER_IMAGE = 'postgres:12.16-alpine';
const CONTAINER_NAME = 'cardano-test';

export const removePostgresContainer = async (): Promise<void> => {
Expand Down

0 comments on commit 13109d6

Please sign in to comment.