Skip to content

Latest commit

 

History

History
126 lines (91 loc) · 2.75 KB

File metadata and controls

126 lines (91 loc) · 2.75 KB

Docker Configuration for Project Nexus

This directory contains Docker configuration files for containerizing the Project Nexus application.

📁 Files

  • Dockerfile - Frontend container configuration
  • docker-compose.yml - Multi-container orchestration
  • .dockerignore - Files to exclude from Docker build

🚀 Quick Start

Prerequisites

  • Docker Desktop installed (Download here)
  • Docker Compose (included with Docker Desktop)

Option 1: Using Docker Compose (Recommended)

# Navigate to project root
cd "f:\BS IT\Project_Nexus"

# Build and start containers
docker-compose -f docker/docker-compose.yml up -d

# Access the application
# Open browser: http://localhost:3000

Option 2: Using Dockerfile Directly

# Navigate to project root
cd "f:\BS IT\Project_Nexus"

# Build Docker image
docker build -t project-nexus-frontend -f docker/Dockerfile .

# Run container
docker run -d -p 3000:80 --name nexus-app project-nexus-frontend

# Access the application
# Open browser: http://localhost:3000

🛠️ Docker Commands

Start Services

docker-compose -f docker/docker-compose.yml up -d

Stop Services

docker-compose -f docker/docker-compose.yml down

View Logs

docker-compose -f docker/docker-compose.yml logs -f frontend

Rebuild Image

docker-compose -f docker/docker-compose.yml build --no-cache
docker-compose -f docker/docker-compose.yml up -d

Remove Everything

docker-compose -f docker/docker-compose.yml down -v
docker rmi project-nexus-frontend

📋 Container Details

Container Port Description
frontend 3000:80 React app served via Nginx

🔮 Future Services (To be implemented by Saad)

The docker-compose.yml includes commented sections for:

  • Backend API (FastAPI)
  • PostgreSQL Database
  • Redis Cache
  • MongoDB (if needed)
  • Apache Kafka (if needed)

These will be uncommented and configured during Phase 2 backend development.

🐛 Troubleshooting

Port Already in Use

# Change port in docker-compose.yml from 3000:80 to 3001:80

Build Fails

# Clean Docker cache
docker system prune -a

# Rebuild from scratch
docker-compose -f docker/docker-compose.yml build --no-cache

Container Won't Start

# Check logs
docker logs project-nexus-frontend

# Check if port is available
netstat -ano | findstr :3000

📝 Notes

  • Frontend container uses multi-stage build for optimized image size
  • Production build is served via Nginx
  • Development environment should still use npm run dev for HMR
  • Docker is primarily for production deployment and testing

Last Updated: 27 January 2026