FROM python:3.12-slim WORKDIR /app ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 RUN apt-get update && apt-get install -y --no-install-recommends git ripgrep && rm -rf /var/lib/apt/lists/* COPY pyproject.toml . RUN pip install --no-cache-dir . COPY . . RUN pip install --no-cache-dir . CMD ["sh", "-c", "alembic upgrade head && python -m app.main"]