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