-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 729 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 729 Bytes
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
# Dockerfile
FROM node:22-slim AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM python:3.12-slim
WORKDIR /app
# System deps for OCR (tesseract + ghostscript required by ocrmypdf)
RUN apt-get update && \
apt-get install -y --no-install-recommends tesseract-ocr ghostscript && \
rm -rf /var/lib/apt/lists/*
# Python deps
COPY pyproject.toml ./
COPY src/ src/
RUN pip install --no-cache-dir -e .
# Demo samples
COPY demo_samples/ demo_samples/
# Built frontend
COPY --from=frontend-build /app/frontend/dist frontend/dist
EXPOSE 8000
CMD ["uvicorn", "hardware_sets_api.app:app", "--host", "0.0.0.0", "--port", "8000"]