From bc802b6f1909663ed182492447197b103380e7fc Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Sun, 14 Aug 2022 20:02:18 +0000 Subject: [PATCH] fix: postgresql on ARM --- apps/api/src/lib/common.ts | 7 ++++++- csb.nix | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/api/src/lib/common.ts b/apps/api/src/lib/common.ts index a2b78bf50..68afa8861 100644 --- a/apps/api/src/lib/common.ts +++ b/apps/api/src/lib/common.ts @@ -873,6 +873,11 @@ export function generateDatabaseConfiguration(database: any, arch: string): } if (isARM(arch)) { configuration.volume = `${id}-${type}-data:/var/lib/postgresql`; + configuration.environmentVariables = { + POSTGRES_PASSWORD: dbUserPassword, + POSTGRES_USER: dbUser, + POSTGRES_DB: defaultDatabase + } } return configuration } else if (type === 'redis') { @@ -909,7 +914,7 @@ export function generateDatabaseConfiguration(database: any, arch: string): return configuration } } -export function isARM(arch) { +export function isARM(arch: string) { if (arch === 'arm' || arch === 'arm64') { return true } diff --git a/csb.nix b/csb.nix index 2005806f9..b2b07e4de 100644 --- a/csb.nix +++ b/csb.nix @@ -1,7 +1,7 @@ with import {}; stdenv.mkDerivation { - name = "git"; + name = "environment"; buildInputs = [ git git-lfs