Skip to content

Conversation

adintegra
Copy link
Contributor

Closes #

This PR...

How to test

  1. Go to...

  • Add a CHANGELOG entry

Copy link

vercel bot commented Mar 20, 2025

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

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 20, 2025 3:55pm

Copy link
Contributor

@wereHamster wereHamster left a comment

Choose a reason for hiding this comment

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

I have not tested locally since I don't have Docker installed. But the change looks good.


EXPOSE 3000

# Instead of running npm start; handle signals (SIGINT/SIGTERM) properly
Copy link
Contributor

Choose a reason for hiding this comment

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

Newer versions of Next.js require ENV HOSTNAME=0.0.0.0. Might be worth adding it today to not get any surprises when you upgrade Next.js in the future.

See official Docker example: https://github.com/vercel/next.js/blob/62ac6d040183d48a5d83d2b197826c0c471caa62/examples/with-docker/Dockerfile#L65

Comment on lines +95 to +101
# The file that Next.js generates is CommonJS, but the frontend folder has a
# package.json with type:module, so node expects ESM when files have a .js
# extension.
#
# This should eventually be fixed in Next.js, but for the time being adjusting
# the extension seems to be the easiest path forward (thanks @wereHamster!)
RUN mv ./app/server.js ./app/server.cjs
Copy link
Contributor

Choose a reason for hiding this comment

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

This project does not use type:module, so renaming the file to add the .cjs extension is not necessary. And I believe the latest Next.js works without this workaround (if you ever decide to switch to type:module).

@wereHamster wereHamster requested a review from Copilot April 24, 2025 13:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • .dockerignore: Language not supported
  • Dockerfile: Language not supported

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.

2 participants