Sign inSign up

8076381912/node-redis-mongo

By 8076381912

•Updated 4 months ago

Image
0

41

8076381912/node-redis-mongo repository overview

⁠Node.js CRUD Application with Redis & MongoDB

This is a high-performance Node.js REST API that utilizes Redis for efficient data caching and MongoDB as the primary persistent database.


⁠Prerequisites

Before running this container, make sure both Redis and MongoDB are already installed and running locally on your host system:

  • Redis Port: 6379 (Default)
  • MongoDB Port: 27017 (Default)

⁠How to Run the Container

Follow these two simple steps to pull and run the application:

⁠Step 1: Pull the image from Docker Hub
docker pull 8076381912/node-redis-mongo:v1
⁠Step 2: Run the container with Host Network

You must use the --network host flag so that the containerized Node.js application can seamlessly communicate with the Redis and MongoDB services running on your local machine.

docker run -d --name my-redis-app --network host 8076381912/node-redis-mongo:v1

⁠Important Note

Since this container is launched using --network host, traditional port forwarding (-p 3000:3000) is not required. The application will directly bind to port 3000 on your host system. You can access the API at http://localhost:3000.

Tag summary

Content type

Image

Digest

sha256:9700d0bd5…

Size

53 MB

Last updated

4 months ago

docker pull 8076381912/node-redis-mongo:v1