Skip to content

Commit

Permalink
feat: enhance Dockerfile and Next.js config for improved server funct…
Browse files Browse the repository at this point in the history
…ionality and module resolution
  • Loading branch information
Tade Strehk committed Nov 29, 2024
1 parent 927af3d commit ae8107c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Dockerfile.chase.frontend
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Binary file modified bun.lockb
Binary file not shown.
4 changes: 4 additions & 0 deletions chase/frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ const nextConfig = {
images: {
unoptimized: true,
},
experimental: {
// Enable built-in module resolution
serverComponentsExternalPackages: [],
}
};

module.exports = nextConfig;
2 changes: 1 addition & 1 deletion chase/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit ae8107c

Please sign in to comment.