feat: 프로젝트 기본 구조 구축
This commit is contained in:
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
# Python 3.13 기반 이미지
|
||||
FROM python:3.13-slim
|
||||
|
||||
# 환경 변수 설정
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1
|
||||
|
||||
# 작업 디렉토리 설정
|
||||
WORKDIR /app
|
||||
|
||||
# 시스템 패키지 업데이트 및 필요한 패키지 설치
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
gcc \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# uv 설치
|
||||
RUN pip install uv
|
||||
|
||||
# 의존성 파일 복사
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
# 의존성 설치
|
||||
RUN uv pip install --system -r pyproject.toml
|
||||
|
||||
# 애플리케이션 코드 복사
|
||||
COPY . .
|
||||
|
||||
# 정적 파일 디렉토리 생성
|
||||
RUN mkdir -p /app/staticfiles
|
||||
|
||||
# 데이터베이스 마이그레이션 및 정적 파일 수집 스크립트
|
||||
COPY docker-entrypoint.sh /app/
|
||||
RUN chmod +x /app/docker-entrypoint.sh
|
||||
|
||||
# 포트 노출
|
||||
EXPOSE 8000
|
||||
|
||||
# 엔트리포인트 설정
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
|
||||
# 기본 명령어
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:8000", "--workers", "4", "executor.wsgi:application"]
|
||||
Reference in New Issue
Block a user