mirror of
https://github.com/R0m1k3/Menu.git
synced 2026-10-12 01:38:39 +02:00
build: include native dependencies in standalone output and Docker image copy steps
This commit is contained in:
1 parent
cf582387b5
commit
2fd431b907
2 files changed
+10
-2
No files matched your search
+3
-1
@@ -46,9 +46,11 @@ COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
COPY --from=builder /app/prisma.config.ts ./prisma.config.ts
|
||||
|
||||
# Explicitly copy Prisma node_modules (required for standalone mode)
|
||||
# Explicitly copy Prisma and native node_modules (required for standalone mode)
|
||||
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
||||
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
|
||||
COPY --from=builder /app/node_modules/better-sqlite3 ./node_modules/better-sqlite3
|
||||
COPY --from=builder /app/node_modules/bcrypt ./node_modules/bcrypt
|
||||
|
||||
# Ensure prisma directory is accessible and writable for SQLite
|
||||
RUN mkdir -p /app/prisma && chmod -R 777 /app/prisma
|
||||
|
||||
+7
-1
@@ -2,7 +2,13 @@ import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
output: 'standalone',
|
||||
serverExternalPackages: ['@prisma/client'],
|
||||
serverExternalPackages: [
|
||||
'@prisma/client',
|
||||
'@prisma/adapter-better-sqlite3',
|
||||
'better-sqlite3',
|
||||
'bcrypt',
|
||||
'prisma'
|
||||
],
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in new issue
Block a user