Skip to content

Commit

Permalink
fix(nix): Update postgres-setup.sh dependencies
Browse files Browse the repository at this point in the history
 * Add gnugrep, tree
 * Add postgres-setup.sh to path inside docker image
  • Loading branch information
sgillespie committed May 9, 2024
1 parent 534ad31 commit 8589861
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions nix/docker.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

, bashInteractive, cacert, cardano-cli, cardano-db-sync, cardano-db-tool
, cardano-smash-server, coreutils, curl, findutils, getconf, glibcLocales
, gnused, gnutar, gzip, jq, iana-etc, iproute, iputils, lib, libidn, libpqxx
, postgresql, socat, utillinux
, gnugrep, gnused, gnutar, gzip, jq, iana-etc, iproute, iputils, lib, libidn
, libpqxx, postgresql, socat, tree, utillinux
}:

let
Expand All @@ -22,6 +22,11 @@ let
ln -s ${coreutils}/bin/env $out/usr/bin/env
'';

postgresql-setup-sh = runCommand "postgresql-setup.sh" {} ''
mkdir -p $out/usr/bin
cp "${../scripts/postgresql-setup.sh}" $out/usr/bin/postgresql-setup.sh
'';

baseImage = dockerTools.buildImage {
name = "cardano-db-sync-base-env";
config.Env = [ "NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" ];
Expand All @@ -37,6 +42,7 @@ let
findutils # GNU find
getconf # get num cpus
glibcLocales # Locale information for the GNU C Library
gnugrep # GNU grep
gnused # GNU sed
gnutar # GNU tar
gzip # Gnuzip
Expand All @@ -51,6 +57,8 @@ let
utillinux # System utilities for Linux
cardano-cli # tool for interacting with cardano-node
cardano-db-tool # utilities for creating database snapshots
postgresql-setup-sh # script for creating snapshots
tree # list contents of directories in a tree
];
};

Expand Down
2 changes: 2 additions & 0 deletions nix/nixos/cardano-db-sync-service.nix
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,10 @@ in {
config.services.postgresql.package
netcat
bash
gnugrep
gnutar
gzip
tree
];
preStart = ''
for x in {1..60}; do
Expand Down

0 comments on commit 8589861

Please sign in to comment.