FROM python:3.11-slim WORKDIR /app RUN useradd --create-home --shell /bin/bash app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . RUN chown -R app:app /app USER app EXPOSE 8000 CMD ["sh", "-c", "alembic upgrade head && uvicorn app.app:fastApi --host 0.0.0.0 --port 8000"]