Overview
The Meta-Data Tag Generator uses Docker Compose to orchestrate multiple services including the FastAPI backend, Next.js frontend, PostgreSQL database, MinIO object storage, and Redis for job management.Estimated installation time: 10-15 minutes (including Docker image downloads)
Prerequisites
System Requirements
- OS: Linux, macOS, or Windows with WSL2
- RAM: 4GB minimum, 8GB recommended
- Storage: 5GB minimum, 20GB recommended
- CPU: 2+ cores
Required Software
- Docker 20.10+
- Docker Compose 2.0+
- Git
- Port availability: 3001, 8000, 5432, 9000, 9001, 6379
Install Docker & Docker Compose
- Linux
- macOS
- Windows
Installation Steps
Configure Environment Variables (Optional)
Create a
.env file in the backend directory to customize settings:.env
Review Docker Compose Configuration
The
docker-compose.yml defines 6 services:docker-compose.yml
All services include health checks to ensure proper startup order. The backend waits for the database to be ready before starting.
Build and Start Services
First-time build takes 5-10 minutes as it downloads base images and installs dependencies including Tesseract OCR, EasyOCR models, and PyTorch.
Verify Installation
Check that all services are running:All services should show Expected response:
Up or Up (healthy) status.Test individual services:- Backend API
- Frontend
- PostgreSQL
- MinIO
- Redis
Initialize Database Schema
The database schema is automatically created on first startup via the init script:Expected tables:
usersrefresh_tokensprocessing_jobsdocuments
The schema creation SQL is located at
backend/app/database/schema.sql and is automatically executed via Docker volume mount.Service Architecture
Port Mapping
| Service | Internal Port | External Port | Purpose |
|---|---|---|---|
| Frontend | 3000 | 3001 | Web UI |
| Backend | 8000 | 8000 | REST API & WebSocket |
| PostgreSQL | 5432 | 5432 | Database |
| MinIO API | 9000 | 9000 | S3-compatible storage |
| MinIO Console | 9001 | 9001 | Admin interface |
| Redis | 6379 | 6379 | Job queue |
Volume Management
Docker Compose creates persistent volumes for data:Volume Locations
| Volume | Purpose | Typical Size |
|---|---|---|
postgres_data | User data, jobs, documents | 100MB - 10GB |
minio_data | Uploaded PDFs, results | 1GB - 100GB |
redis_data | Job state, cache | 10MB - 1GB |
easyocr_models | Pre-trained OCR models | 400MB - 2GB |
Resource Limits
The backend service has resource limits defined:Why 4GB limit? EasyOCR requires significant memory when loading models for complex scripts. For production with heavy OCR workloads, increase to 8GB.
Adjusting Resources
Editdocker-compose.yml:
Troubleshooting
Services won't start
Services won't start
Check logs:Common issues:
- Ports already in use: Change port mappings in
docker-compose.yml - Insufficient memory: Increase Docker Desktop memory allocation
- Database not ready: Wait for health checks to pass
Database connection errors
Database connection errors
Symptoms: Backend logs show
connection refused or database not readySolutions:MinIO bucket creation fails
MinIO bucket creation fails
Create bucket manually:
- Open http://localhost:9001
- Login with
minioadmin/minioadmin123 - Create bucket named
metatag-files - Set policy to
public(or configure access policies)
EasyOCR model download issues
EasyOCR model download issues
Symptoms: First OCR request takes very long or failsSolution: Pre-download models:This downloads models to the
easyocr_models volume for future use.Frontend can't connect to backend
Frontend can't connect to backend
Check environment variable:Frontend expects Rebuild frontend:
NEXT_PUBLIC_BACKEND_URL=http://backend:8000For local development:Permission denied errors
Permission denied errors
Linux users: Docker volume permissions issue
Development Mode
For active development, enable live code reloading:Stopping Services
- Stop (keep data)
- Stop and remove containers
- Complete cleanup
Updating the Application
Production Deployment
For production deployment, see:Architecture Overview
Understand the system architecture and components
Environment Variables
Configure your deployment with environment variables
Processing Workflow
Learn the document processing workflow
AI Models
Choose and configure AI models
Next Steps
Installation complete! Your Meta-Data Tag Generator is ready to use.
- Process your first document - Follow the quick start guide
- Configure API settings - Customize processing parameters
- Explore the API - Integrate with your applications