Revert standalone output, keep serverExternalPackages fix
- Remove output: standalone to keep migration/seed workflow - Restore original Dockerfile structure with full node_modules copy - Keep serverExternalPackages for @elysiajs/static and elysia to fix the Html prerender error caused by dynamic import in @elysiajs/static - Keep NODE_ENV=production before build step Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -44,14 +44,17 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Set the working directory
|
# Set the working directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy necessary files from build stage (standalone output)
|
# Copy necessary files from build stage
|
||||||
COPY --from=build /app/.next/standalone ./
|
COPY --from=build /app/package.json ./
|
||||||
COPY --from=build /app/.next/static ./.next/static
|
COPY --from=build /app/tsconfig.json ./
|
||||||
|
COPY --from=build /app/.next ./.next
|
||||||
COPY --from=build /app/public ./public
|
COPY --from=build /app/public ./public
|
||||||
|
COPY --from=build /app/src ./src
|
||||||
|
COPY --from=build /app/node_modules ./node_modules
|
||||||
COPY --from=build /app/prisma ./prisma
|
COPY --from=build /app/prisma ./prisma
|
||||||
|
|
||||||
# Expose the port
|
# Expose the port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Start the application
|
# Start the application
|
||||||
CMD ["bun", "server.js"]
|
CMD ["bun", "start"]
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
output: 'standalone',
|
|
||||||
serverExternalPackages: ['@elysiajs/static', 'elysia'],
|
serverExternalPackages: ['@elysiajs/static', 'elysia'],
|
||||||
experimental: {},
|
experimental: {},
|
||||||
allowedDevOrigins: [
|
allowedDevOrigins: [
|
||||||
|
|||||||
Reference in New Issue
Block a user