Skip to content

build: 🧑‍💻 specify nodemon and remove USER directive for dev container #1145

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

Merged
merged 3 commits into from
May 23, 2025

Conversation

HannesOberreiter
Copy link
Contributor

  • Updated the base image in Dockerfile.dev from node:18-alpine to node:lts-alpine to use more or less the same as for production docker build (where the client is build lts and server is 18... so yeah not really...)
  • Removed the USER node directive, to prevent permission issues as we hook the whole folder into the container.
  • Modified the docker-compose-dev.yml file to enhance the database healthcheck. The new healthcheck ensures not only postgres is ready but also the database is ready by running a sample query (SELECT 1) and adjusts the interval, retries, and start period for better reliability.
  • Added a nodemon.json configuration file to watch only relevant files (node_modules would be ignored but not files like the python venv) and avoid rapid successive restarts with the delay.

@meltyshev
Copy link
Member

Hi! Thanks for the improvements 🙏

Just a quick question: the main Dockerfile also uses the node:18-alpine image. I'm a bit concerned that a new Node.js version could introduce breaking changes. Shouldn't we pin the version to node:18-alpine for consistency?

@HannesOberreiter
Copy link
Contributor Author

HannesOberreiter commented May 23, 2025

It's preferable to use a similar environment for both development and build. I noticed that your production container uses node:lts to build the client. Therefore, I assumed this might be intentional, perhaps due to the fact that Node.js 18 is now end-of-life, and many frontend libraries have already adopted Node.js 20 as the minimum supported version. I tested both the server and client using the current LTS version (Node.js 22), and everything—including npm install—ran without issues. However, I haven't performed thorough testing yet.

@meltyshev
Copy link
Member

It's preferable to use a similar environment for both development and build. I noticed that your production container uses node:lts to build the client. Therefore, I assumed this might be intentional, perhaps due to the fact that Node.js 18 is now end-of-life, and many frontend libraries have already adopted Node.js 20 as the minimum supported version. I tested both the server and client using the current LTS version (Node.js 22), and everything—including npm install—ran without issues. However, I haven't performed thorough testing yet.

Oh, you're right. I thought the client's Node.js version in the production Dockerfile was pinned too :)

@meltyshev meltyshev merged commit f9d3e73 into plankanban:master May 23, 2025
3 checks passed
@HannesOberreiter HannesOberreiter deleted the dev/docker branch May 23, 2025 14:20
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