Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Improvements #80

Merged
merged 8 commits into from
May 7, 2024
Merged

Build Improvements #80

merged 8 commits into from
May 7, 2024

Conversation

nicholeuf
Copy link
Owner

@nicholeuf nicholeuf commented May 4, 2024

Note: VSCode Debugging Caveats

I attempted to create a launch.json entry to attach to the running docker container, but it is not working at this moment. I saw that there was a fix recently that should have addressed the issue, but it's not solved when I upgrade next. I will punt on this for now.

Copy link

vercel bot commented May 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zen-site-next ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 7, 2024 3:18pm

@nicholeuf nicholeuf changed the title Dockerize Dockerize development & switch to pnpm May 4, 2024
Copy link

codecov bot commented May 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.78%. Comparing base (b459903) to head (36935de).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   99.78%   99.78%           
=======================================
  Files          55       55           
  Lines         462      462           
  Branches       41       41           
=======================================
  Hits          461      461           
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented May 4, 2024

✅ Meticulous spotted zero visual differences across 187 screens tested: view results.

Last updated for commit 36935de. This comment will update as new commits are pushed.

@nicholeuf nicholeuf changed the title Dockerize development & switch to pnpm Build Improvements May 7, 2024
@nicholeuf nicholeuf self-assigned this May 7, 2024
@nicholeuf nicholeuf marked this pull request as ready for review May 7, 2024 15:34
"scripts": {
"dev": "next dev",
"dev:debug": "NODE_OPTIONS='--inspect' next dev",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to debug in vscode, this needs to be set to the following:

NODE_OPTIONS='--inspect=0.0.0.0' next dev

However, the following error occurs, which is documented in vercel/next.js#53127, which still does not work even when upgrading next. This issue will be punted to another task.

➜  zen-site-next git:(dockerize) docker compose up --build
[+] Building 87.7s (12/12) FINISHED                                                                                            docker:desktop-linux
 => [app internal] load build definition from Dockerfile                                                                                       0.0s
 => => transferring dockerfile: 282B                                                                                                           0.0s
 => [app internal] load metadata for docker.io/library/node:18-alpine                                                                          0.6s
 => [app internal] load .dockerignore                                                                                                          0.0s
 => => transferring context: 216B                                                                                                              0.0s
 => [app 1/7] FROM docker.io/library/node:18-alpine@sha256:4837c2ac8998cf172f5892fb45f229c328e4824c43c8506f8ba9c7996d702430                    0.0s
 => [app internal] load build context                                                                                                          0.8s
 => => transferring context: 72.31MB                                                                                                           0.8s
 => CACHED [app 2/7] WORKDIR /app                                                                                                              0.0s
 => [app 3/7] COPY package.json ./                                                                                                             0.1s
 => [app 4/7] COPY pnpm-lock.yaml ./                                                                                                           0.0s
 => [app 5/7] RUN corepack enable                                                                                                              0.6s
 => [app 6/7] RUN pnpm install                                                                                                                28.8s
 => [app 7/7] COPY . .                                                                                                                        11.2s
 => [app] exporting to image                                                                                                                  35.9s
 => => exporting layers                                                                                                                       35.2s
 => => writing image sha256:0d264e9dc620645580496252b56b4f5d23e23f2bd904f8ebe59c5a5804ba57c9                                                   0.2s
 => => naming to docker.io/library/zen-site-next-app                                                                                           0.0s
[+] Running 1/1
 ✔ Container zen-site-next-app-1  Recreated                                                                                                    0.2s
Attaching to app-1
app-1  |
app-1  | > zen-site-next@ dev:debug /app
app-1  | > NODE_OPTIONS='--inspect=0.0.0.0' next dev
app-1  |
app-1  | Debugger listening on ws://0.0.0.0:9229/d4d2bd4a-6dbd-49ce-afa4-34248380d560
app-1  | For help, see: https://nodejs.org/en/docs/inspector
app-1  | /usr/local/bin/node:  must be 0 or in range 1024 to 65535.
app-1  |
app-1 exited with code 0

@nicholeuf nicholeuf merged commit c7d725a into main May 7, 2024
9 checks passed
@nicholeuf nicholeuf deleted the dockerize branch May 7, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerize development environment Switch to pnpm
1 participant