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.
This commit is contained in:
MickLesk
2026-04-05 19:37:27 +02:00
parent 136875dd2c
commit 117245947b

View File

@@ -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"