Abeshith's picture
Docker Stages Implemented
5259cf2
|
raw
history blame
1.18 kB

Docker Setup

This project includes Docker configuration for easy deployment and monitoring.

Services

  • FastAPI App (port 8000): Main ML API
  • Prometheus (port 9090): Metrics collection
  • Grafana (port 3000): Visualization dashboards

Quick Start

1. Build and Start

docker-compose up -d

2. Access Services

3. Stop Services

docker-compose down

Useful Commands

# View logs
docker-compose logs -f

# View app logs only
docker-compose logs -f app

# Rebuild after code changes
docker-compose up -d --build

# Stop and remove volumes
docker-compose down -v

Environment Variables

Create .env file with:

MLFLOW_TRACKING_URI=your_dagshub_uri
DAGSHUB_TOKEN=your_token

Grafana Setup

  1. Login to Grafana (admin/admin)
  2. Datasources are auto-configured
  3. Dashboards are auto-loaded

Health Checks

# Check app health
curl http://localhost:8000/health

# Check Prometheus targets
curl http://localhost:9090/api/v1/targets