Repository navigation
Expand file tree
/
Copy pathDockerfile.dev
More file actions
56 lines (47 loc) · 1.46 KB
/
Copy pathDockerfile.dev
File metadata and controls
56 lines (47 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# Development Dockerfile with hot reload support
# Based on the production Dockerfile but with development tools
FROM python:3.12-slim
# Install all dependencies (no multi-stage for dev)
RUN apt-get update && apt-get install -y \
# Build essentials
build-essential gcc g++ \
# Tesseract OCR and languages
tesseract-ocr tesseract-ocr-deu tesseract-ocr-eng \
# PDF utilities
poppler-utils \
# Image processing
libglib2.0-0 libsm6 libxext6 libxrender-dev libgomp1 \
# File type detection
libmagic1 libmagic-dev \
# Health check
curl \
# Development tools
vim nano htop \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY app/ ./app/
COPY frontend/ ./frontend/
COPY cli.py ./
COPY docker-entrypoint.sh ./
# Create necessary directories
RUN mkdir -p data/logs data/staging data/storage data/uploads data/backups && \
chmod +x docker-entrypoint.sh
# Development environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app \
ENVIRONMENT=development \
LOG_LEVEL=DEBUG \
DATABASE_URL=sqlite:///./data/documents.db \
TESSERACT_PATH=/usr/bin/tesseract \
POPPLER_PATH=/usr/bin
# Expose ports
EXPOSE 8000
# Use the same entrypoint as production
ENTRYPOINT ["/app/docker-entrypoint.sh"]