mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-31 01:02:20 +00:00
nixos/immich: include DB port in Postgres DB_URL for unix socket (#481056)
This commit is contained in:
@@ -358,7 +358,7 @@ in
|
||||
in
|
||||
[
|
||||
''
|
||||
${lib.getExe' cfg.database.package "psql"} -d "${cfg.database.name}" -f "${sqlFile}"
|
||||
${lib.getExe' cfg.database.package "psql"} -p "${toString cfg.database.port}" -d "${cfg.database.name}" -f "${sqlFile}"
|
||||
''
|
||||
];
|
||||
};
|
||||
@@ -377,7 +377,9 @@ in
|
||||
let
|
||||
postgresEnv =
|
||||
if isPostgresUnixSocket then
|
||||
{ DB_URL = "postgresql:///${cfg.database.name}?host=${cfg.database.host}"; }
|
||||
{
|
||||
DB_URL = "postgresql:///${cfg.database.name}?host=${cfg.database.host}&port=${toString cfg.database.port}";
|
||||
}
|
||||
else
|
||||
{
|
||||
DB_HOSTNAME = cfg.database.host;
|
||||
|
||||
Reference in New Issue
Block a user