Changed dependency management to poetry (#1)

Co-authored-by: pptx704 <rafeedm.bhuiyan@gmail.com>
Reviewed-on: #1
This commit is contained in:
2025-06-24 03:56:49 +00:00
parent 52aa93d67c
commit c3213938a0
17 changed files with 2034 additions and 54 deletions

View File

@ -1,17 +1,27 @@
FROM python:3.14.0a3-slim
FROM python:3.12-slim
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
COPY --from=ghcr.io/ufoscout/docker-compose-wait:latest /wait /wait
# Install pip requirements
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
WORKDIR /app
WORKDIR /
COPY . /
# Install poetry
RUN pip install poetry
# Configure poetry to not create virtual environment in container
RUN poetry config virtualenvs.create false
# Copy poetry files
COPY pyproject.toml poetry.lock* /app/
# Install dependencies
RUN poetry install --only main --no-root --no-directory
COPY . /app
RUN poetry install --only main
EXPOSE 8000
CMD /wait; alembic upgrade head; uvicorn main:app --host 0.0.0.0
CMD /wait; poetry run alembic upgrade head; poetry run fastapi run