ocr/app/main.py - FastAPI app with health endpoint
ocr/app/config.py - Environment configuration
ocr/tests/test_health.py - Unit tests for health, HEIC, and Tesseract
Ready for review.
## Implementation Complete
PR #72 implements the OCR service container with all acceptance criteria met:
### Verified
- `mvp-ocr` container builds successfully
- Container starts and passes health check (healthy status)
- FastAPI app responds at `/health` with `{"status": "healthy"}`
- pillow-heif can load HEIC images (unit test passed)
- Tesseract can process test images (unit test passed)
- Container integrates with existing backend network
- docker-compose.yml now has 6 services configured
### Files Created
- `ocr/Dockerfile` - Python 3.11-slim with system dependencies
- `ocr/requirements.txt` - FastAPI, pillow-heif, pytesseract, opencv
- `ocr/app/main.py` - FastAPI app with health endpoint
- `ocr/app/config.py` - Environment configuration
- `ocr/tests/test_health.py` - Unit tests for health, HEIC, and Tesseract
Ready for review.
Fixed the deployment error unable to prepare context: path "/opt/motovaultpro/ocr" not found.
Root cause: The OCR service was configured with build: context: ./ocr which works for local development, but CI/CD deploys pre-built images from the registry. The ocr/ directory isn't synced to the deploy path.
Fix: Updated all CI/CD workflows to build, push, and deploy the OCR image from the registry:
File
Change
staging.yaml
Build and push ocr:$SHA image, pull OCR image, include in health checks
production.yaml
Pull OCR image, start mvp-ocr as shared service
docker-compose.staging.yml
Added mvp-ocr with image: ${OCR_IMAGE} override
docker-compose.blue-green.yml
Added mvp-ocr with image: ${OCR_IMAGE} override
The OCR service is a shared service (like postgres/redis), not part of blue-green deployment.
## CI/CD Fix Pushed
Fixed the deployment error `unable to prepare context: path "/opt/motovaultpro/ocr" not found`.
**Root cause:** The OCR service was configured with `build: context: ./ocr` which works for local development, but CI/CD deploys pre-built images from the registry. The `ocr/` directory isn't synced to the deploy path.
**Fix:** Updated all CI/CD workflows to build, push, and deploy the OCR image from the registry:
| File | Change |
|------|--------|
| `staging.yaml` | Build and push `ocr:$SHA` image, pull OCR image, include in health checks |
| `production.yaml` | Pull OCR image, start mvp-ocr as shared service |
| `docker-compose.staging.yml` | Added `mvp-ocr` with `image: ${OCR_IMAGE}` override |
| `docker-compose.blue-green.yml` | Added `mvp-ocr` with `image: ${OCR_IMAGE}` override |
The OCR service is a **shared service** (like postgres/redis), not part of blue-green deployment.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Overview
Add Python OCR container (mvp-ocr) to the docker-compose architecture. This is the foundation for all OCR functionality.
Parent Issue: #12 (OCR-powered smart capture)
Priority: P0 - Foundation
Dependencies: None
Scope
Container Setup
mvp-ocrservice todocker-compose.yml/healthCore Dependencies (requirements.txt)
System Package Requirements
Directory Structure
Docker Compose Integration
Acceptance Criteria
mvp-ocrcontainer builds successfully/healthwith{"status": "healthy"}make setupandmake rebuildwork with 6 containersTechnical Notes
docs/ocr-pipeline-tech-stack.mdfor full architectureOut of Scope
Implementation Complete
PR #72 implements the OCR service container with all acceptance criteria met:
Verified
mvp-ocrcontainer builds successfully/healthwith{"status": "healthy"}Files Created
ocr/Dockerfile- Python 3.11-slim with system dependenciesocr/requirements.txt- FastAPI, pillow-heif, pytesseract, opencvocr/app/main.py- FastAPI app with health endpointocr/app/config.py- Environment configurationocr/tests/test_health.py- Unit tests for health, HEIC, and TesseractReady for review.
CI/CD Fix Pushed
Fixed the deployment error
unable to prepare context: path "/opt/motovaultpro/ocr" not found.Root cause: The OCR service was configured with
build: context: ./ocrwhich works for local development, but CI/CD deploys pre-built images from the registry. Theocr/directory isn't synced to the deploy path.Fix: Updated all CI/CD workflows to build, push, and deploy the OCR image from the registry:
staging.yamlocr:$SHAimage, pull OCR image, include in health checksproduction.yamldocker-compose.staging.ymlmvp-ocrwithimage: ${OCR_IMAGE}overridedocker-compose.blue-green.ymlmvp-ocrwithimage: ${OCR_IMAGE}overrideThe OCR service is a shared service (like postgres/redis), not part of blue-green deployment.