FROM python:3.12-slim AS runtime ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY migrations ./migrations COPY src ./src RUN useradd -m app && chown -R app /app USER app EXPOSE 8080 CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080"]