From b4d55574676ee6a83f0a785126d785cffcd57fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Placzy=C5=84ski?= Date: Tue, 19 Mar 2024 06:53:01 +0100 Subject: [PATCH 1/2] [#503] Parametrize the configuration files for PostgreSQL with ENVs In order to enhance the ease of remote execution, the configuration files for PostgreSQL have been modified to rely on environment variable. This change enables smoother execution processes as it allows for flexible configurations that can adapt to different environments or setups. Changes: - Updated the `docker-compose.node+dbsync.yml` file to use environment variables for defining PostgreSQL configuration files, leveraging `$TARGET_HOST_CONFIG_DIR` for specifying file paths. This adjustment ensures that the execution setup is more versatile and can be easily adaptable for remote deployments. --- .../govtool/docker-compose.node+dbsync.yml | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/scripts/govtool/docker-compose.node+dbsync.yml b/scripts/govtool/docker-compose.node+dbsync.yml index bcd8ba8c4..f461f4326 100644 --- a/scripts/govtool/docker-compose.node+dbsync.yml +++ b/scripts/govtool/docker-compose.node+dbsync.yml @@ -7,12 +7,16 @@ # easily interact with the Cardano blockchain and perform data queries through # the exposed PostgreSQL database on port 5432 on the DBSync database. # -# Before start there are three text files that has to be set up in a current -# directory in order to provide sufficient database configuration for both -# PostgreSQL and Cardano DBSync services: -# * ./dev-postgres_db -# * ./dev-postgres_password -# * ./dev-postgres_user +# Before start there are three text files that has to be set up in a GovTool +# configuration directory in order to provide sufficient database configuration +# for both PostgreSQL and Cardano DB Sync services: +# * ${TARGET_HOST_CONFIG_DIR}/dev-postgres_db +# * ${TARGET_HOST_CONFIG_DIR}/dev-postgres_password +# * ${TARGET_HOST_CONFIG_DIR}/dev-postgres_user +# +# The GovTool configuration directory under ${TARGET_HOST_CONFIG_DIR} has to be +# created, the sufficient privileges has to be applied to it to read it's +# context and the ENV has to be provided with proper value. # # USAGE: # docker compose --file docker-compose.node+dbsync.yml up --detach @@ -82,11 +86,11 @@ services: secrets: postgres_db: - file: ./dev-postgres_db + file: ${TARGET_HOST_CONFIG_DIR}/dev-postgres_db postgres_password: - file: ./dev-postgres_password + file: ${TARGET_HOST_CONFIG_DIR}/dev-postgres_password postgres_user: - file: ./dev-postgres_user + file: ${TARGET_HOST_CONFIG_DIR}/dev-postgres_user volumes: db-sync-data: From 223679b9018732d566fcb5bc81d7caffe3c002d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Placzy=C5=84ski?= Date: Tue, 19 Mar 2024 06:56:45 +0100 Subject: [PATCH 2/2] [#503] Update Cardano DB Sync version to 4.1.0 In the context of the user story, which aimed to update the Cardano DB Sync version for Sanchonet to unblock tasks related to verification and adjustments, this commit bumps the version of Cardano DB Sync to 4.1.0 on a development stack providing only Cardano tools. By upgrading to the latest release, developers will be able to proceed with the necessary verifications and adjustments to ensure application compatibility with the updated DB Sync version. Changes: - Updated the `docker-compose.node+dbsync.yml` file to use the Cardano DB Sync image version 4.1.0 (`ghcr.io/intersectmbo/cardano-db-sync:sancho-4.1.0`). --- scripts/govtool/docker-compose.node+dbsync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/govtool/docker-compose.node+dbsync.yml b/scripts/govtool/docker-compose.node+dbsync.yml index f461f4326..076c26da9 100644 --- a/scripts/govtool/docker-compose.node+dbsync.yml +++ b/scripts/govtool/docker-compose.node+dbsync.yml @@ -65,7 +65,7 @@ services: retries: 10 cardano-db-sync: - image: ghcr.io/intersectmbo/cardano-db-sync:sancho-4-0-0-fix-config + image: ghcr.io/intersectmbo/cardano-db-sync:sancho-4.1.0 environment: - NETWORK=sanchonet - POSTGRES_HOST=postgres