Files
uis-cloud-computing/7project/backend/Dockerfile

12 lines
244 B
Docker

FROM python:3.11-slim
WORKDIR /app
RUN useradd -m appuser
USER appuser
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD alembic upgrade head && uvicorn app.app:app --host 0.0.0.0 --port 8000