This is an environment for developing any Node.js application.
When you want to develop or fix a Node.js app, it may only work with a specific version of Node.js. Instead of changing the version on your computer, you can do it through this Docker container. Simply choose the Node.js version in the .env file.
- Copy the
docker/.env.examplefile to.envand modify it as needed, such as setting the desired Node.js version. - In the
appfolder, the content is an example. Place your project inside. - Use the following Docker commands:
docker/create_env.sh: To configure your environment and remove unnecessary files including folder .gitdocker/version: To select a Node version, for example,18,20, or22docker/exec: To execute a command in the containerdocker/log: To get real-time logsdocker/restart: To rebuild and restart the containerdocker/start: To build and start the containerdocker/stop: To stop and remove the unused containerdocker/nodemon: Allows you to use nodemon on the container, for example with the example filesdocker/nodemon app.
And that's it, very simple.
- Julien Jean
- France
- By discord