INIT(api): add FastAPI application
- Initialize FastAPI project structure - Add basic API configuration
This commit is contained in:
34
deploy/docker/Dockerfile.dev
Normal file
34
deploy/docker/Dockerfile.dev
Normal file
@@ -0,0 +1,34 @@
|
||||
# Development Dockerfile for Joossam FastAPI OMR Grading Service
|
||||
FROM python:3.11-slim
|
||||
|
||||
# 시스템 의존성 설치 (OpenCV용)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libgl1-mesa-glx \
|
||||
libglib2.0-0 \
|
||||
libsm6 \
|
||||
libxext6 \
|
||||
libxrender-dev \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Python 의존성 설치
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# 개발용 의존성 추가
|
||||
RUN pip install --no-cache-dir watchfiles
|
||||
|
||||
# 애플리케이션 코드 복사
|
||||
COPY . .
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
# 헬스체크
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD curl -f http://localhost:8000/health || exit 1
|
||||
|
||||
# 개발 서버 실행 (hot-reload 활성화)
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
|
||||
|
||||
Reference in New Issue
Block a user