Skip to content

boldbat/free_port3

Repository files navigation

Oyu Intelligence LLC Portfolio

Professional portfolio website for Oyu Intelligence LLC - AI Automation & Digital Solutions.

Visit Oyu Intelligence.

Oyu Intelligence

About Oyu Intelligence LLC

Oyu Intelligence LLC is a Mongolian Start-Up company dedicated to transforming businesses through innovative digital solutions. We specialize in:

  • AI Automation - Intelligent solutions for business process automation
  • Mobile App Development - Cross-platform iOS and Android applications
  • Website Design & Development - Modern, responsive web solutions
  • Social Media Development - Strategic digital marketing solutions

Getting Started

This portfolio is built with Next.js and modern web technologies. It requires Node.js v18.17+.

Local Development

1. Install dependencies

npm install

2. Run development server

npm run dev

3. Build for production

npm run build
npm start

Docker Development

We provide comprehensive Docker support for both development and production environments.

Prerequisites

Quick Start with Docker

Development Environment:

# Build and run development container
docker-compose up magic-portfolio-dev

# Or use the helper script (Linux/macOS)
./docker-scripts/build.sh dev
./docker-scripts/run.sh dev

# Or use the helper script (Windows)
docker-scripts\build.bat dev

Production Environment:

# Build and run production container
docker-compose --profile production up magic-portfolio-prod

# Or use the helper script (Linux/macOS)
./docker-scripts/build.sh prod
./docker-scripts/run.sh prod

Docker Commands Reference

Building Images:

# Development image
docker build -f Dockerfile.dev -t magic-portfolio:dev .

# Production image
docker build -f Dockerfile -t magic-portfolio:prod .

Running Containers:

# Development (with hot reload)
docker run -p 3000:3000 -v $(pwd):/app -v /app/node_modules magic-portfolio:dev

# Production
docker run -p 3000:3000 magic-portfolio:prod

Using Docker Compose:

# Development
docker-compose up magic-portfolio-dev

# Production
docker-compose --profile production up magic-portfolio-prod

# Run in background
docker-compose up -d magic-portfolio-dev

Docker Helper Scripts

We provide convenient scripts for common Docker operations:

Linux/macOS:

  • ./docker-scripts/build.sh [dev|prod|all] - Build Docker images
  • ./docker-scripts/run.sh [dev|prod|compose-dev|compose-prod] - Run containers
  • ./docker-scripts/clean.sh [containers|images|all|system] - Cleanup resources

Windows:

  • docker-scripts\build.bat [dev|prod|all] - Build Docker images

Environment Variables

Copy .env.docker to .env.local and customize as needed:

cp .env.docker .env.local

Key environment variables:

  • NODE_ENV - Environment (development/production)
  • PORT - Application port (default: 3000)
  • NEXT_TELEMETRY_DISABLED - Disable Next.js telemetry
  • NEXT_PUBLIC_APP_URL - Application URL for SEO

Health Checks

The application includes health check endpoints:

  • HTTP: GET /api/health - Returns application status
  • Docker: Built-in health checks for container monitoring

Performance Optimization

The Docker setup includes several optimizations:

  • Multi-stage builds for smaller production images
  • Layer caching for faster rebuilds
  • Non-root user for security
  • Health checks for reliability
  • Volume mounting for development hot reload

Troubleshooting

Common Issues:

  1. Docker not running:

    # Start Docker Desktop and verify
    docker info
  2. Port already in use:

    # Use different port
    docker run -p 3001:3000 magic-portfolio:dev
  3. Permission issues (Linux/macOS):

    # Make scripts executable
    chmod +x docker-scripts/*.sh
  4. Build failures:

    # Clean Docker cache
    docker system prune -f
    
    # Rebuild without cache
    docker build --no-cache -f Dockerfile.dev -t magic-portfolio:dev .
  5. Container won't start:

    # Check logs
    docker logs magic-portfolio-dev
    
    # Check container status
    docker ps -a

Performance Issues:

  • Ensure Docker Desktop has sufficient resources (4GB+ RAM recommended)
  • Enable file sharing for your project directory in Docker Desktop settings
  • Use Docker volumes for node_modules to improve performance

Development Hot Reload:

  • Ensure volume mounting is working: -v $(pwd):/app
  • Check that WATCHPACK_POLLING=true is set for Windows/WSL2

Contact


Transforming ideas into digital reality.

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors