| |
| |
| |
| FROM node:20-alpine AS frontend-builder |
|
|
| WORKDIR /app/frontend |
|
|
| |
| COPY frontend/package.json frontend/package-lock.json ./ |
| RUN npm ci --silent |
|
|
| |
| COPY frontend/ . |
| RUN npm run build |
|
|
|
|
| |
| |
| |
| FROM python:3.11-slim |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| curl \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| COPY main.py . |
| COPY quantum_entanglement.txt . |
|
|
| |
| COPY --from=frontend-builder /app/frontend/build ./frontend/build |
|
|
| |
| RUN useradd -m -u 1001 appuser && chown -R appuser:appuser /app |
| USER appuser |
|
|
| |
| RUN mkdir -p /app/chroma_db |
|
|
| EXPOSE 7860 |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"] |