feat: OCR Service Container Setup #64
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.