- Fix eternal Loading spinner: track Zustand hydration state, wait for both hydration and pathname before auth redirect decisions - OLIVER Brand: Montserrat font, gold/orange/black palette, 4px radius, dark mode default, OLIVER wordmark logo, remove blue/purple gradients - Cloud Run HTTP service for document processing (cloud_run_service.py, Dockerfile.cloud-run) with OIDC auth client - Knowledge endpoints: delegate to Cloud Run when CLOUD_RUN_PROCESSOR_URL is set, fallback to Celery - Gitignore: junk files, context handover docs, root node_modules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
38 lines
957 B
Text
38 lines
957 B
Text
# === Builder stage ===
|
|
FROM python:3.11-slim AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
libpq-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
|
|
|
|
# === Runtime stage ===
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libpq5 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY --from=builder /install /usr/local
|
|
|
|
RUN groupadd -r nexus && useradd -r -g nexus -d /app -s /sbin/nologin nexus
|
|
|
|
COPY . .
|
|
|
|
RUN mkdir -p /app/uploads && chown -R nexus:nexus /app
|
|
|
|
USER nexus
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health')" || exit 1
|
|
|
|
CMD ["uvicorn", "cloud_run_service:app", "--host", "0.0.0.0", "--port", "8080"]
|