From 117245947b1defe648eaf401788e501198ffc1ad Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sun, 5 Apr 2026 19:37:27 +0200 Subject: [PATCH] fix(kan): remove POSTGRES_URL from build env, add CI=true Next.js pre-renders pages during build. With POSTGRES_URL exported, Server Components try to query DB tables that don't exist yet (migrations run after build), causing the build to hang indefinitely. Docker build does NOT set POSTGRES_URL and sets CI=true to skip env validation. Match that behavior. --- install/kan-install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install/kan-install.sh b/install/kan-install.sh index 5e94fa02..52a134ee 100644 --- a/install/kan-install.sh +++ b/install/kan-install.sh @@ -44,10 +44,11 @@ msg_ok "Configured Application" msg_info "Building Application" cd /opt/kan source /opt/kan/.env -export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true NEXT_PUBLIC_BASE_URL BETTER_AUTH_SECRET POSTGRES_URL +export NEXT_PUBLIC_USE_STANDALONE_OUTPUT=true NEXT_PUBLIC_BASE_URL BETTER_AUTH_SECRET +export CI=true $STD pnpm install $STD pnpm build --filter=@kan/web -unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT +unset NEXT_PUBLIC_USE_STANDALONE_OUTPUT CI msg_ok "Built Application" msg_info "Setting up Standalone"