fix: frontend production'da next dev yerine build+start çalışsın
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user