first commit

This commit is contained in:
kyy
2025-10-27 09:39:16 +09:00
commit a756bc9c11
69 changed files with 5714 additions and 0 deletions

36
Dockerfile Normal file
View File

@@ -0,0 +1,36 @@
FROM astral/uv:0.8.9-python3.12-bookworm
WORKDIR /workspace
EXPOSE 8888
ENV PYTHONUNBUFFERED=1
# 시스템 패키지 설치
RUN apt-get update && \
apt-get install -y --no-install-recommends \
vim curl poppler-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
#파일권한 설정.
RUN groupadd -g 1001 user
RUN useradd -r -u 1001 -g user user
RUN chown -R user:user /opt
RUN chown -R user:user /workspace
COPY pyproject.toml .
RUN uv pip install --system --no-cache -r pyproject.toml
# 로컬의 src 디렉토리 내용을 /workspace/src에 복사
COPY src ./src
# user가 쓸 수 있게 소유권 변경
RUN chown -R user:user /workspace/src
# PYTHONPATH를 WORKDIR로 설정
WORKDIR /workspace/src
ENV PYTHONPATH=/workspace/src
USER user
CMD ["sh", "-c", "uvicorn api:app --workers 4 --host 0.0.0.0 --port ${PORT:-8877} --log-config config/log_config.yaml"]