Skip to content

AI4Organization/dockerize-backend-services-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized Node.js Backend Services Template

This repository is a template for setting up a Node.js application using Docker for containerization. It provides a multi-stage Dockerfile setup for installing dependencies, building the application, and creating a production-ready Docker image.

Repository Contents

  • .dockerignore - Specifies files and directories to exclude from the Docker build context.
  • .gitignore - Specifies intentionally untracked files to ignore for Git version control.
  • Dockerfile - Multi-stage Dockerfile to build and run the Node.js application.
  • LICENSE - The MIT license under which this template is provided.
  • README.md - Documentation describing the repository's purpose and contents.

Dockerfile Stages

The Dockerfile is divided into three stages:

  1. Builder: Installs production dependencies.
  2. Compiler: Compiles the application from TypeScript (if applicable).
  3. Production: Creates the production image with only necessary files.

Usage

To use this template, follow these steps:

  1. Clone the repository to your local machine.

  2. Customize the Dockerfile as needed for your application.

  3. Build your Docker image using the following command:

    docker build -t your-app-name .
  4. Run your Docker container using the following command:

    docker run -d -p 3000:3000 your-app-name

License

This project is licensed under the MIT License - see the LICENSE file for details.


For more information on Docker and containerization, visit the official Docker documentation.

About

Dockerfile template to run backend services with NodeJS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published