FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

TPVinnie/docker-node-app · GitHub

Repository navigation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Docker Node App

A simple Node.js application demonstrating containerization with Docker.

Overview

This project shows how to dockerize a Node.js application, making it easy to develop, deploy, and run consistently across different environments.

Prerequisites

  • Docker installed on your machine
  • Node.js (for local development without Docker)

Project Structure

docker-node-app/
├── src/                 # Application source code
├── .dockerignore       # Files to exclude from Docker image
├── .gitignore          # Files to exclude from Git
├── Dockerfile          # Docker image configuration
├── package.json        # Node.js dependencies and scripts
├── package-lock.json   # Locked dependency versions
└── README.md          # This file

Getting Started

Running with Docker

  1. Clone the repository

    git clone https://github.com/TPVinnie/docker-node-app.git
    cd docker-node-app
  2. Build the Docker image

    docker build -t docker-node-app .
  3. Run the container

    docker run -p 3000:3000 docker-node-app
  4. Access the application Open your browser and navigate to http://localhost:3000

Running Locally (without Docker)

  1. Install dependencies

    npm install
  2. Start the application

    npm start

Docker Commands

Build the image

docker build -t docker-node-app .

Run the container

docker run -p 3000:3000 docker-node-app

Run in detached mode

docker run -d -p 3000:3000 docker-node-app

Stop the container

docker stop <container-id>

View running containers

docker ps

View all containers

docker ps -a

Development

To make changes to the application:

  1. Edit files in the src/ directory
  2. Rebuild the Docker image
  3. Run the updated container

For faster development, you can use volume mounting to sync local changes:

docker run -p 3000:3000 -v $(pwd)/src:/app/src docker-node-app

Additional Resources

See getting-started-example.md for more detailed instructions.

License

©2023 Psitron Technologies - MLOps course

Contributing

This is a forked repository. For contributions, please refer to the original repository at 03sarath/docker-node-app.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL