fix: update Dockerfile for poetry installation and fix pyproject.toml
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -2,16 +2,23 @@ FROM python:3.13-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV PYTHONPATH=/app/src
|
||||
ENV PYTHONPATH=/app/ \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
POETRY_NO_INTERACTION=1 \
|
||||
POETRY_VIRTUALENVS_CREATE=false \
|
||||
POETRY_CACHE_DIR=/tmp/poetry_cache
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN pip install poetry
|
||||
RUN apt-get update \
|
||||
&& pip install --no-cache-dir poetry \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY pyproject.toml poetry.lock README.md ./
|
||||
RUN poetry install --without dev --no-interaction --no-root
|
||||
|
||||
COPY src/ ./src/
|
||||
|
||||
RUN poetry install --no-ansi && rm -rf $POETRY_CACHE_DIR
|
||||
COPY .env.example .env
|
||||
|
||||
EXPOSE 8010
|
||||
|
||||
Reference in New Issue
Block a user