fix: production prisma engine and error handling
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
10
app/page.tsx
10
app/page.tsx
@@ -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
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user