fix: production prisma engine and error handling

This commit is contained in:
AyrisAI
2026-05-15 20:34:33 +03:00
parent 77ba5702a6
commit 9dcd441a13
3 changed files with 11 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ RUN chown nextjs:nodejs .next
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
COPY --from=builder --chown=nextjs:nodejs /app/node_modules/.prisma ./node_modules/.prisma
USER nextjs USER nextjs

View File

@@ -18,7 +18,15 @@ export default async function Page() {
}); });
if (!restaurant) { if (!restaurant) {
return <div>Veritabanı yükleniyor...</div>; return (
<div style={{ background: '#000', color: '#fff', height: '100vh', display: 'flex', alignItems: 'center', justifyContent: 'center', textAlign: 'center', padding: '20px' }}>
<div>
<h1 style={{ color: 'var(--gold)' }}>LUNA</h1>
<p>Henüz menü verisi bulunamadı veya veritabanı bağlantısı kurulamadı.</p>
<p style={{ fontSize: '0.8rem', color: '#666' }}>Lütfen admin panelinden bir restoran ve kategori oluşturulduğundan emin olun.</p>
</div>
</div>
);
} }
// Map database structure to the structure expected by MenuView // Map database structure to the structure expected by MenuView

View File

@@ -1,5 +1,6 @@
generator client { generator client {
provider = "prisma-client-js" provider = "prisma-client-js"
binaryTargets = ["native", "linux-musl-openssl-3.0.x"]
} }
datasource db { datasource db {