- Uses Node.js 24 LTS
- Reproducible npm installs from the committed lockfile
- Runs as a non-root user for enhanced security
- Multi-stage development, test, and production images
- Snyk dependency scanning and CodeQL security checks in CI
- Properly handles
SIGINTandSIGTERMevents with tini
With Node.js 24 installed:
npm ci
npm test
npm run lint
npm run devOr run the development container with live source mounts:
docker compose up --buildThis application is also available on Dockerhub.
To launch the container:
docker run -d -p 8080:8080 --name docker-node-app jonfairbanks/docker-node-app:latestTo verify its health:
curl --fail http://localhost:8080/healthzYou can find this app on Helm!
This application can also be helpful verifying Kubernetes:
- Scaling and Downtime Mitigation
- Cluster Load Balancing
- Request IP Passthrough
Validate or install the bundled chart with Helm 3:
helm lint chart
helm upgrade --install docker-node-app chartFor testing that pods are balancing correctly, you can make multiple requests to your app to verify.
To make 50 requests and write them to a file, you can run the following with your endpoint:
for run in {1..50}; do curl -sSL -D - docker-node-app.local -o /dev/null | grep X-Hostname; done