top of page
Search

Deploy Any Node.js App to Render with Docker and GitHub Actions in Minutes

  • Jul 31
  • 2 min read

Updated: Oct 6

This is your complete, copy-paste-ready guide to set up automated deployment for any Node.js application. Whether you're building a REST API, web app, or micro-service system, this tutorial will get you from zero to production deployment in under 30 minutes.


What You'll Build


✅ Universal Node.js app - works with any framework (Express, Fastify, NestJS, etc.)

✅ Docker containerization - consistent deployment across environments

✅ GitHub Actions CI/CD - automated testing, building, and deployment

✅ Render cloud deployment - production-ready hosting with automatic scaling

✅ Zero-downtime deployments - blue-green deployment with health checks


Project Structure



If you don't have a Node.js project at hand, you can use this repository to follow the steps in this tutorial.


Complete Deployment Guide


Step 1: Copy the Required Files


  1. In your repository, create `.github/workflows/three-stage.yml` with the following structure. You can copy the config from this link.


After you run the command, you will be able to see this in your working directory.



This is the content of the `three-stage.yml`:



Step 2: Create Dockerfile



Step 3: Customize Your Configuration


Change these 3 values only:


  1. App Port: Update `APP_PORT` in `deploy.yml` (default: 10000)

  2. App Name: Update `DOCKER_IMAGE` in `deploy.yml` (e.g., "my-node-app")

  3. Health Check: Update `HEALTH_CHECK_PATH` in `deploy.yml` (default: "/health")


Step 4: Set Up Render Deploy Hook


A deploy hook lets you trigger deployments securely from GitHub Actions.


  1. On the left menu bar on your Render project page, choose Settings.

  2. Copy the URL under Deploy Hook.

  3. On your GitHub repository, go to → SettingsSecrets and VariablesActions.



  1. Click on New repository secret.



  1. Use `RENDER_DEPLOY_HOOK` as the secret's name and the copied URL as the secret's value. Click on Add secret!



Step 5: Commit and Push Your Changes


  1. Commit and push your changes:



Step 6: Monitor Deployment


  1. Check the GitHub Actions tab for build progress.

  2. View the Render dashboard for deployment status.

  3. Test your deployed app at your Render URL.


Troubleshooting Guide



Useful Commands



Conclusion


In conclusion, this guide walks you through setting up a complete CI/CD pipeline for a Node.js app using Docker, GitHub Actions, and Render for deployment. It covers creating essential files, configuring environment variables, building and testing Docker images, and deploying to Render. With this automated process, you can easily deploy your Node.js applications with minimal manual intervention. This ensures consistent and reliable deployments, along with automated health checks and zero-downtime updates.


By leveraging our cloud and AI technical edge services, you can enhance your deployment strategy and drive traffic effectively.

 
 
visa.webp
paypal.png
mastercard.png
Website design © WatadTech - Rising Wishes Trading LLC
bottom of page