From b5c761afbf10f33b0d8faea389f146424c55f982 Mon Sep 17 00:00:00 2001 From: ayrisdev Date: Wed, 2 Sep 2026 22:59:53 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20frontend=20production'da=20next=20dev=20?= =?UTF-8?q?yerine=20build+start=20=C3=A7al=C4=B1=C5=9Fs=C4=B1n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dockerfile'ın CMD'si next dev kullanıyordu — Coolify'de canlı sistemde dev-mode overlay/bildirimleri (Next.js sürüm uyarısı, hata detayları) ve optimize edilmemiş, JIT-compile edilen bir build çalışıyordu. Artık image build sırasında next build çalışıyor, CMD sadece next start. DATABASE_URL build adımında gerçek bir DB'ye ihtiyaç duymuyor (tüm sayfalar force-dynamic, build sırasında sorgu atılmıyor) ama Prisma client import'ta connection string formatını doğruluyor — yer tutucu bir değer verildi, Coolify'nin gerçek DATABASE_URL'i runtime'da onun üzerine yazıyor zaten. Co-Authored-By: Claude Sonnet 5 --- apps/frontend/Dockerfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/frontend/Dockerfile b/apps/frontend/Dockerfile index 1a7758d..f443b22 100644 --- a/apps/frontend/Dockerfile +++ b/apps/frontend/Dockerfile @@ -7,4 +7,12 @@ COPY . . RUN pnpm install RUN pnpm --filter @streamclipper/db exec prisma generate -CMD ["pnpm", "--filter", "@streamclipper/frontend", "dev"] +# DATABASE_URL isn't needed for real at build time (all pages are +# force-dynamic — nothing queries the DB during `next build`), but +# Prisma's client validates the connection string format at import, so a +# well-formed placeholder keeps the build step from failing. Coolify's +# actual DATABASE_URL is supplied as a runtime env var and overrides this. +ENV DATABASE_URL="postgresql://build:build@localhost:5432/build" +RUN pnpm --filter @streamclipper/frontend build + +CMD ["pnpm", "--filter", "@streamclipper/frontend", "start"]