diff --git a/Dockerfile.chase.frontend b/Dockerfile.chase.frontend index 27154864..c14f6bed 100644 --- a/Dockerfile.chase.frontend +++ b/Dockerfile.chase.frontend @@ -27,13 +27,17 @@ FROM oven/bun:latest AS release WORKDIR /app/prod COPY --from=nextjs /app/staging/node_modules ./node_modules/ COPY --from=builder /app/staging/chase/frontend/public ./public/ +# Copy the entire standalone directory COPY --from=builder /app/staging/chase/frontend/.next/standalone ./ COPY --from=builder /app/staging/chase/frontend/.next/static ./.next/static +# Add this line to copy required server files +COPY --from=builder /app/staging/chase/frontend/.next/server ./.next/server + ARG NEXT_PUBLIC_VERSION ENV NODE_ENV=production ENV PORT=3000 ENV NEXT_PUBLIC_VERSION=${NEXT_PUBLIC_VERSION} -# run the app + USER bun EXPOSE 3000/tcp ENTRYPOINT [ "bunx", "next", "start" ] \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index b405bb62..8d8a2e7a 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/chase/frontend/next.config.js b/chase/frontend/next.config.js index 9bc42e12..a7f860b9 100644 --- a/chase/frontend/next.config.js +++ b/chase/frontend/next.config.js @@ -4,6 +4,10 @@ const nextConfig = { images: { unoptimized: true, }, + experimental: { + // Enable built-in module resolution + serverComponentsExternalPackages: [], + } }; module.exports = nextConfig; diff --git a/chase/frontend/package.json b/chase/frontend/package.json index 029b37ec..1ae62d35 100644 --- a/chase/frontend/package.json +++ b/chase/frontend/package.json @@ -22,7 +22,7 @@ "fuse.js": "^7.0.0", "markdown-to-jsx": "^7.4.7", "mousetrap-react": "^0.0.3", - "next": "14.2.17", + "next": "14.2.18", "next-runtime-env": "^3.2.1", "oidc-client-ts": "^3.0.1", "postcss": "8.4.38",