try fix script
This commit is contained in:
@@ -5,8 +5,7 @@
|
||||
|
||||
outputs = _: {
|
||||
lib = {
|
||||
mkLib = pkgs: pwd: import ./lib.nix { inherit pkgs pwd; };
|
||||
mkLib = pkgs: import ./lib.nix { inherit pkgs; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
6
lib.nix
6
lib.nix
@@ -1,7 +1,7 @@
|
||||
{ pkgs, pwd }:
|
||||
let
|
||||
inherit (pkgs) lib;
|
||||
runtime = builtins.toString pwd + "/.compose";
|
||||
runtime = ".compose";
|
||||
in
|
||||
{
|
||||
mkWrapper =
|
||||
@@ -122,7 +122,7 @@ in
|
||||
echo "PostgreSQL initdb process completed"
|
||||
echo
|
||||
fi
|
||||
cp ${configFile} ${data_dir}/postgresql.conf
|
||||
cp ${configFile} $PGDATA/postgresql.conf
|
||||
if [[ "$POSTGRES_RUN_INITIAL_SCRIPT" == "true" ]]; then
|
||||
echo
|
||||
echo "PostgreSQL is setting up the initial database"
|
||||
@@ -142,7 +142,7 @@ in
|
||||
name = "run-postgres";
|
||||
text = ''
|
||||
set -euo pipefail
|
||||
export PGDATA=${data_dir} PGHOST=${runtimeDir} PGPORT=${builtins.toString port}
|
||||
export PGDATA=$(realpath ${data_dir}) PGHOST=$(realpath (${runtimeDir}) PGPORT=${builtins.toString port}
|
||||
mkdir -p ${lib.escapeShellArg runtimeDir}
|
||||
${setupScript}/bin/setup-postgres
|
||||
${package}/bin/postgres
|
||||
|
||||
Reference in New Issue
Block a user