File size: 972 Bytes
2b86c60 d491dc1 2b86c60 d491dc1 2b86c60 d491dc1 2b86c60 d491dc1 2b86c60 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | FROM node:22.14-alpine AS frontend-builder
WORKDIR /frontend
COPY frontend/package*.json ./
RUN npm ci
COPY frontend/ ./
ENV VITE_BACKEND_URL="" VITE_API_URL=""
RUN npm run build
FROM python:3.11-slim AS runner
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends libgomp1 \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN useradd -m -u 1000 appuser && mkdir /app/.local && chown appuser:appuser /app/.local
COPY --chown=appuser:appuser backend/ backend/
COPY --chown=appuser:appuser scripts/ scripts/
COPY --chown=appuser:appuser evaluation/ evaluation/
COPY --chown=appuser:appuser deploy/start.sh deploy/start.sh
COPY --from=frontend-builder --chown=appuser:appuser /frontend/dist /app/frontend/dist
ENV PYTHONUNBUFFERED=1
USER appuser
# Single-container deployment (API and worker); docker-compose.yml runs them as separate services.
EXPOSE 7860
CMD ["sh", "deploy/start.sh"]
|