Changeset 0.5.0 (#35)

This commit is contained in:
2026-02-19 15:03:20 +00:00
parent a93a6b9635
commit 30d0c11219
65 changed files with 5345 additions and 8070 deletions

View File

@@ -2,19 +2,28 @@
# Chat Switchboard - Frontend Dockerfile
# ==========================================
# Static SPA served by nginx. No API proxy —
# in cluster mode, the Ingress routes /api/ to
# in k8s, the Ingress routes /api/ and /ws to
# the backend service directly.
# Also used for the lite (unmanaged) deployment.
#
# Build context: repo root
# ==========================================
# Production stage
FROM nginx:alpine
# Stage 1: Download vendor libs (vendor/ is gitignored)
FROM node:20-alpine AS vendor
WORKDIR /tmp
RUN npm pack marked@16.3.0 dompurify@3.2.4 2>/dev/null && \
mkdir -p /vendor && \
tar xzf marked-*.tgz -C /tmp && cp /tmp/package/lib/marked.umd.js /vendor/marked.min.js && \
rm -rf /tmp/package && \
tar xzf dompurify-*.tgz -C /tmp && cp /tmp/package/dist/purify.min.js /vendor/purify.min.js && \
rm -rf /tmp/package /tmp/*.tgz
# Stage 2: nginx
FROM nginx:1-alpine
# Static-only nginx config (no /api/ proxy)
COPY nginx.frontend.conf /etc/nginx/conf.d/default.conf
# Built SPA files
COPY src /usr/share/nginx/html
COPY src/ /usr/share/nginx/html/
COPY --from=vendor /vendor/ /usr/share/nginx/html/vendor/
EXPOSE 80