Skip to content

Commit 8589861

Browse files
committed
fix(nix): Update postgres-setup.sh dependencies
* Add gnugrep, tree * Add postgres-setup.sh to path inside docker image
1 parent 534ad31 commit 8589861

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

nix/docker.nix

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99

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

1616
let
@@ -22,6 +22,11 @@ let
2222
ln -s ${coreutils}/bin/env $out/usr/bin/env
2323
'';
2424

25+
postgresql-setup-sh = runCommand "postgresql-setup.sh" {} ''
26+
mkdir -p $out/usr/bin
27+
cp "${../scripts/postgresql-setup.sh}" $out/usr/bin/postgresql-setup.sh
28+
'';
29+
2530
baseImage = dockerTools.buildImage {
2631
name = "cardano-db-sync-base-env";
2732
config.Env = [ "NIX_SSL_CERT_FILE=${cacert}/etc/ssl/certs/ca-bundle.crt" ];
@@ -37,6 +42,7 @@ let
3742
findutils # GNU find
3843
getconf # get num cpus
3944
glibcLocales # Locale information for the GNU C Library
45+
gnugrep # GNU grep
4046
gnused # GNU sed
4147
gnutar # GNU tar
4248
gzip # Gnuzip
@@ -51,6 +57,8 @@ let
5157
utillinux # System utilities for Linux
5258
cardano-cli # tool for interacting with cardano-node
5359
cardano-db-tool # utilities for creating database snapshots
60+
postgresql-setup-sh # script for creating snapshots
61+
tree # list contents of directories in a tree
5462
];
5563
};
5664

nix/nixos/cardano-db-sync-service.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,10 @@ in {
261261
config.services.postgresql.package
262262
netcat
263263
bash
264+
gnugrep
264265
gnutar
265266
gzip
267+
tree
266268
];
267269
preStart = ''
268270
for x in {1..60}; do

0 commit comments

Comments
 (0)