Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 39 additions & 7 deletions content/guides/nodejs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,44 @@
time: 20 minutes
---

The Node.js language-specific guide teaches you how to containerize a Node.js application using Docker. In this guide, you’ll learn how to:
[Node.js](https://nodejs.org/en) is a powerful JavaScript runtime for building scalable, high-performance applications. This guide demonstrates containerizing a modern TypeScript Node.js application with React frontend, PostgreSQL database, and production-ready Docker configurations.

- Containerize and run a Node.js application
- Set up a local environment to develop a Node.js application using containers
- Run tests for a Node.js application using containers
- Configure a CI/CD pipeline for a containerized Node.js application using GitHub Actions
- Deploy your containerized Node.js application locally to Kubernetes to test and debug your deployment
The sample application is a modern full-stack Todo application featuring:

Start by containerizing an existing Node.js application.
- **Backend**: Express.js 5.x with TypeScript, PostgreSQL database, RESTful API with comprehensive error handling
- **Frontend**: React 19 with Vite, Tailwind CSS 4, modern UI components and hooks

Check failure on line 23 in content/guides/nodejs/_index.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Vite'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Vite'?", "location": {"path": "content/guides/nodejs/_index.md", "range": {"start": {"line": 23, "column": 31}}}, "severity": "ERROR"}
- **Build System**: Lightning-fast esbuild for server builds (12KB output), Vite for client builds

Check failure on line 24 in content/guides/nodejs/_index.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Vite'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Vite'?", "location": {"path": "content/guides/nodejs/_index.md", "range": {"start": {"line": 24, "column": 77}}}, "severity": "ERROR"}

Check failure on line 24 in content/guides/nodejs/_index.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'esbuild'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'esbuild'?", "location": {"path": "content/guides/nodejs/_index.md", "range": {"start": {"line": 24, "column": 36}}}, "severity": "ERROR"}
- **Production Features**: Multi-stage Docker builds, security hardening, health checks, graceful shutdown
- **Development Tools**: Hot reload, debugging support, comprehensive testing with Vitest

Check failure on line 26 in content/guides/nodejs/_index.md

View workflow job for this annotation

GitHub Actions / validate (vale)

[vale] reported by reviewdog 🐶 [Vale.Spelling] Did you really mean 'Vitest'? Raw Output: {"message": "[Vale.Spelling] Did you really mean 'Vitest'?", "location": {"path": "content/guides/nodejs/_index.md", "range": {"start": {"line": 26, "column": 84}}}, "severity": "ERROR"}
- **Architecture**: Clean separation of client/server code, shared utilities, and comprehensive test coverage

> **Acknowledgment**
>
> Docker extends its sincere gratitude to [Kristiyan Velkov](https://www.linkedin.com/in/kristiyan-velkov-763130b3/) for authoring this guide. As a Docker Captain and experienced Full-stack engineer, his expertise in Docker, DevOps, and modern web development has made this resource invaluable for the community, helping developers navigate and optimize their Docker workflows.

---

## What will you learn?

In this guide, you will learn how to:

- Containerize and run a Node.js application using Docker.
- Run unit tests inside a Docker container.
- Set up a development container environment.
- Configure GitHub Actions for CI/CD with Docker.
- Deploy your Dockerized Node.js app to Kubernetes.

To begin, you’ll start by containerizing an existing Node.js application.

---

## Prerequisites

Before you begin, make sure you're familiar with the following:

- Basic understanding of [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) and [TypeScript](https://www.typescriptlang.org/).
- Basic knowledge of [Node.js](https://nodejs.org/en), [npm](https://docs.npmjs.com/about-npm), and [React](https://react.dev/) for modern web development.
- Understanding of Docker concepts such as images, containers, and Dockerfiles. If you're new to Docker, start with the [Docker basics](/get-started/docker-concepts/the-basics/what-is-a-container.md) guide.
- Familiarity with [Express.js](https://expressjs.com/) for backend API development.

Once you've completed the Node.js getting started modules, you’ll be ready to containerize your own Node.js application using the examples and instructions provided in this guide.
140 changes: 0 additions & 140 deletions content/guides/nodejs/configure-ci-cd.md

This file was deleted.

Loading
Loading