Skip to content

Commit 669f3d2

Browse files
committed
docs: add Docker setup instructions to README and CONTRIBUTING
- Add Docker badge to README - Add Docker section with commands, services table, health checks - Update MongoDB setup with Docker Compose option - Add Docker option to CONTRIBUTING.md development section - Update dashboard README with Docker instructions
1 parent f851bfe commit 669f3d2

File tree

3 files changed

+116
-0
lines changed

3 files changed

+116
-0
lines changed

CONTRIBUTING.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ Thanks for your interest in contributing to Tracker Hub!
1010

1111
## Development Environment
1212

13+
### Option 1: Docker (Recommended)
14+
15+
```bash
16+
# Start all services
17+
docker compose up -d
18+
19+
# View logs
20+
docker compose logs -f
21+
22+
# Rebuild after changes
23+
docker compose build --no-cache && docker compose up -d
24+
```
25+
26+
### Option 2: Local Development
27+
1328
```bash
1429
# Install dependencies
1530
pnpm install

README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
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>
@@ -34,6 +35,7 @@
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>
@@ -79,6 +81,7 @@
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)
219309
docker run -d --name mongodb \

packages/dashboard/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ Admin panel for session replay and telemetry monitoring.
2020

2121
## Installation
2222

23+
### Option 1: Docker (Recommended)
24+
25+
```bash
26+
# From project root
27+
docker compose up -d dashboard
28+
29+
# Access at http://localhost:3001
30+
```
31+
32+
### Option 2: Local Development
33+
2334
```bash
2435
# Install dependencies
2536
pnpm install

0 commit comments

Comments
 (0)