44 <img src =" https://img.shields.io/badge/NestJS-E0234E?style=for-the-badge&logo=nestjs&logoColor=white " alt =" NestJS " >
55 <img src =" https://img.shields.io/badge/MongoDB-4EA94B?style=for-the-badge&logo=mongodb&logoColor=white " alt =" MongoDB " >
66 <img src =" https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge&logo=tailwind-css&logoColor=white " alt =" Tailwind CSS " >
7+ <img src =" https://img.shields.io/badge/Docker-2496ED?style=for-the-badge&logo=docker&logoColor=white " alt =" Docker " >
78</p >
89
910<h1 align =" center " >🔍 Tracker Hub</h1 >
3435 <a href =" #-features " >Features</a > •
3536 <a href =" #-demo " >Demo</a > •
3637 <a href =" #-installation " >Installation</a > •
38+ <a href =" #-docker " >Docker</a > •
3739 <a href =" #-usage " >Usage</a > •
3840 <a href =" #-architecture " >Architecture</a > •
3941 <a href =" #-contributing " >Contributing</a >
7981- ** Node.js** >= 18.x
8082- ** pnpm** >= 8.x
8183- ** MongoDB** >= 6.x
84+ - ** Docker** >= 20.x (optional, for containerized deployment)
8285
8386### Steps
8487
@@ -99,6 +102,84 @@ pnpm build
99102
100103---
101104
105+ ## 🐳 Docker
106+
107+ ### Quick Start with Docker Compose
108+
109+ The easiest way to run the entire stack:
110+
111+ ``` bash
112+ # Clone the repository
113+ git clone https://github.com/byRespect/tracker-hub.git
114+ cd tracker-hub
115+
116+ # Start all services
117+ docker compose up -d
118+
119+ # Check status
120+ docker compose ps
121+ ```
122+
123+ ### Services
124+
125+ | Service | URL | Description |
126+ | ---------| -----| -------------|
127+ | ** Backend API** | http://localhost:1337 | NestJS REST API |
128+ | ** Frontend** | http://localhost:3000 | React demo application |
129+ | ** Dashboard** | http://localhost:3001 | Admin panel |
130+ | ** MongoDB** | localhost:27018 | Database (internal: 27017) |
131+
132+ ### Docker Commands
133+
134+ ``` bash
135+ # Start all services in background
136+ docker compose up -d
137+
138+ # View logs
139+ docker compose logs -f
140+
141+ # View specific service logs
142+ docker compose logs -f backend
143+
144+ # Stop all services
145+ docker compose down
146+
147+ # Rebuild images (after code changes)
148+ docker compose build --no-cache
149+ docker compose up -d
150+
151+ # Remove all data (including volumes)
152+ docker compose down -v
153+ ```
154+
155+ ### Build Individual Images
156+
157+ ``` bash
158+ # Build only backend
159+ docker compose build backend
160+
161+ # Build only frontend
162+ docker compose build frontend
163+
164+ # Build only dashboard
165+ docker compose build dashboard
166+ ```
167+
168+ ### Health Checks
169+
170+ ``` bash
171+ # Check backend health
172+ curl http://localhost:1337/health
173+
174+ # Check frontend
175+ curl http://localhost:3000/health
176+
177+ # Check dashboard
178+ curl http://localhost:3001/health
179+ ```
180+
181+ ---
182+
102183## Usage
103184
104185### Development
@@ -214,6 +295,15 @@ VITE_API_URL=http://localhost:1337
214295
215296### MongoDB Setup
216297
298+ ** Option 1: Using Docker Compose (Recommended)**
299+
300+ ``` bash
301+ # Starts MongoDB with authentication automatically
302+ docker compose up -d mongodb
303+ ```
304+
305+ ** Option 2: Standalone MongoDB Container**
306+
217307``` bash
218308# MongoDB with Docker (with authentication)
219309docker run -d --name mongodb \
0 commit comments