Files
dbx-main/Dockerfile
T
king 9c94f70e54 feat(라이브): 결과 이미지에서 매출을 읽어 판매금액 칸에 채움
- 방송 창에서 이미지를 고르면 POST /live/broadcasts/read-sales 가 서버 Tesseract 로
  이미지 위 절반의 첫 RM 금액(틱톡 LIVE 결과 화면 Attr. GMV)을 읽어 돌려줌(저장 안 함)
- RM1.2K 같은 줄인 값·못 찾음은 칸을 두고 안내, 사람이 확인 후 저장
- Dockerfile: tesseract-ocr·tesseract-ocr-eng 설치

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 11:09:03 +09:00

26 lines
693 B
Docker

FROM python:3.12-slim
# 작업 디렉토리
WORKDIR /app
# 글자 인식(라이브 커머스 결과 이미지 → 매출, app/modules/live/ocr.py) — 영어 데이터만
RUN apt-get update \
&& apt-get install -y --no-install-recommends tesseract-ocr tesseract-ocr-eng \
&& rm -rf /var/lib/apt/lists/*
# 의존성 먼저 설치 (캐시 활용)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 소스 복사
COPY app/ ./app/
EXPOSE 8000
# --proxy-headers: NPM(Nginx Proxy Manager)의 X-Forwarded-* 헤더 신뢰
CMD ["uvicorn", "app.main:app", \
"--host", "0.0.0.0", \
"--port", "8000", \
"--proxy-headers", \
"--forwarded-allow-ips=*"]