Closed
Conversation
rugitter
commented
Mar 15, 2026
- Added new docker file
- optimise pnpm install process
- add docker-compose file
- fix EOL error when build cross platform
- ignore eslint during build to prevent build failure due to lint error
- Improve Dockerfile
- Add appuser to run the app
- Optimise runtime image in speed and size
* Added new docker file 1. optimise pnpm install process 2. add docker-compose file 3. fix EOL error when build cross platform 4. ignore eslint during build to prevent build failure due to lint error * Improve Dockerfile 1. Add appuser to run the app 2. Optimise runtime image in speed and size --------- Co-authored-by: Charles Cheng <csuchq@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds containerization support for the Next.js frontend by introducing a production Dockerfile + docker-compose workflow, and adjusts Next.js build output to support a standalone runtime image.
Changes:
- Configure Next.js for
output: 'standalone'and skip ESLint duringnext build. - Add a new multi-stage production
Dockerfileand adocker-compose.ymlservice. - Add
.gitattributesfor LF line endings and update.dockerignoreto exclude.next.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
next.config.ts |
Enables standalone output and disables ESLint during builds. |
docker-compose.yml |
Defines a frontend service building the Docker image and exposing port 3000. |
Dockerfile |
Adds a multi-stage build producing a smaller non-root runtime image using Next standalone output. |
.gitattributes |
Enforces LF EOL normalization across platforms. |
.dockerignore |
Updates ignored build-context files, including .next/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+4
to
+9
| # Install pnpm | ||
| RUN corepack enable | ||
|
|
||
| # Copy and Install dependencies | ||
| COPY package.json pnpm-lock.yaml ./ | ||
| RUN pnpm install --frozen-lockfile |
| styledComponents: true, | ||
| }, | ||
| eslint: { | ||
| ignoreDuringBuilds: true, |
|
|
||
| node_modules/ | ||
| # .next/ | ||
| .next/ |
Comment on lines
+3
to
+10
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| ports: | ||
| - "3000:3000" | ||
| volumes: | ||
| - .:/app | ||
| - /app/node_modules |
abbyli-88
approved these changes
Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.