feat: collapsible expansion, canonical pages, citations
Browse files- Dockerfile +35 -0
Dockerfile
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.12-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Python deps (sqlite3 is stdlib — no pip package needed)
|
| 6 |
+
COPY site/requirements.txt .
|
| 7 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
+
|
| 9 |
+
# Copy pipeline and data (cache-bust on each deploy)
|
| 10 |
+
ARG CACHE_BUST=20260816-1527
|
| 11 |
+
COPY pipeline/ ./pipeline/
|
| 12 |
+
RUN mkdir -p ./data
|
| 13 |
+
|
| 14 |
+
# Copy site (Astro static build)
|
| 15 |
+
COPY site/ ./site/
|
| 16 |
+
|
| 17 |
+
# Build Astro static site if dist/ doesn't exist
|
| 18 |
+
# (build-essential is for better-sqlite3 native Node addon compilation)
|
| 19 |
+
RUN if [ ! -d site/dist ]; then \
|
| 20 |
+
apt-get update && \
|
| 21 |
+
apt-get install -y --no-install-recommends build-essential curl && \
|
| 22 |
+
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 23 |
+
apt-get install -y nodejs && \
|
| 24 |
+
cd site && npm install && npm run build && cd .. && \
|
| 25 |
+
apt-get remove -y build-essential nodejs && \
|
| 26 |
+
apt-get autoremove -y && \
|
| 27 |
+
rm -rf /var/lib/apt/lists/*; \
|
| 28 |
+
fi
|
| 29 |
+
|
| 30 |
+
# Copy Space entry point
|
| 31 |
+
COPY space_app.py ./app.py
|
| 32 |
+
|
| 33 |
+
EXPOSE 7860
|
| 34 |
+
|
| 35 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|