IntersectMBO / IntersectMBO/cardano-db-sync

Adapt docker use same scripts as instructions, and not rely on references in nix

Open
#1,977 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Haskell
Stars
318
Forks
168
PR merge metrics
No merged PRs in 30d

Description

**Versions**
The `db-sync` version (eg `cardano-db-sync --version`): 13.6.0.5
PostgreSQL version: 17.2

**Run method**
The method you used to run `cardano-db-sync` (eg Nix/Docker/systemd/none): docker

**Problem Report**

Currently, the docker.nix has it's own implementation that does not make use of `scripts/postgresql-setup.sh` directly from environment variables, but instead roots via docker.nix/cardano-db-sync-service.nix . Thus, any changes to be amended become extremely difficult unless we create our own docker image OR wait for changes upstream that can take quite a while.

For example, recently - we got SKIP_RESTORE_ERROR added to `postgresql-setup.sh` and were expecting to make use of it on the container, but we find out that the postgresql-setup.sh call is only done via `docker.nix` => `cardano-db-sync-service.nix` and it only passes environment variables that were pre-defined for the task.

This issue could have been about adapting the nix file to include the above mentioned environment variable to address this specific issue, but I'd rather make this more generic and remove nix dependencies from operations - which could invite better collaboration/contribution. We have had issues in the past about adding packages/bumping postgres/etc that could've been much easier to work with (locally by mounting alternate script version, as well as for upstream PR) avoiding a resolution going through next release

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.