Files
auto-stock/backend/Dockerfile
shuim ef2fb75848
Some checks failed
CI/CD Pipeline / test-backend (push) Has been cancelled
CI/CD Pipeline / test-frontend (push) Has been cancelled
CI/CD Pipeline / build-and-push (push) Has been cancelled
젠킨스 수정
2026-04-02 11:31:01 +09:00

26 lines
658 B
Docker

FROM python:3.11-slim
WORKDIR /app
# Python 출력 버퍼링 비활성화 (로그 즉시 출력)
ENV PYTHONUNBUFFERED=1
# 시스템 의존성 설치
RUN apt-get update && apt-get install -y \
gcc \
postgresql-client \
&& rm -rf /var/lib/apt/lists/*
# Python 의존성 설치 (requirements.txt 변경 시에만 재설치 — Docker 캐시 활용)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# 애플리케이션 코드 복사 (코드 변경 시에만 이 레이어 갱신)
COPY . .
# 포트 노출
EXPOSE 8000
# 애플리케이션 실행
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]