Skip to content

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

@rdlrt

Description

@rdlrt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions