Files
nibiru-framework.com/docs/Dockerfile
stephan 48c839d927 Initial public push: docs cosmos v4 + AI module + framework groundwork
This is the snapshot the production landing site (nibiru-framework.com) is
deployed from. Brings together the recent splash + docs migration to the v4
"Cosmos" design system, the new in-framework AI module, and the framework
groundwork that backs the framework-reference extraction.

What lands:
- docs/: Astro + Starlight site with the v4 dark cosmic palette, GalaxyHero
  canvas constellation, Mission Control chat (wired to /api/oracle →
  api.neuronetz.ai via providers.mjs Ollama), 5-panel MMVC stage
  (Model · AI · Module · Controller · View), translated EN/DE/JA/ES/FR
  content, PWA + sitemap + llms.txt + Umami analytics.
- docs/design-system/: canonical mockup bundle (source/index-v2.html for
  splash, source/docs-system.html + preview/ for docs, SPEC.md, tokens).
- docs/scripts/extraction/framework-reference-v2.md: deep framework
  reference (~1.6k lines, file:line citations, every public factory and
  idiom — basis for the LoRA training corpus.
- application/module/ai/: AI module with chat / embed / RAG / agent
  plugins, plus pdoQuery / httpGet / fileRead tools and Modelfile +
  smoke-test in training/.
- application/module/users/: user / ACL / form-factory traits used as the
  reference plugin pattern for the framework docs.
- application/settings/config/database/: schema + seed migrations
  including the AI module tables (200–203).
- Form factory + autogenerator changes the framework-reference-v2 covers.

Production secrets stay out: docs/.env, settings.production.ini and
ai.production.ini are all gitignored (.example files are in tree).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 15:22:18 +02:00

55 lines
1.7 KiB
Docker

# syntax=docker/dockerfile:1.6
# ============================================================================
# Nibiru docs site — multi-stage build
#
# Default backend: your Ollama at https://api.neuronetz.ai (no API keys).
# See docker-compose.yml + .env.example for overrides.
# ============================================================================
FROM node:22-alpine AS builder
WORKDIR /app
ENV NODE_ENV=production
ENV NPM_CONFIG_PRODUCTION=false
COPY package.json package-lock.json .npmrc ./
RUN npm ci
COPY . .
# Build-time embedding generation. Soft-fails so missing models / network
# don't break the build — runtime falls back to chat-only mode.
ARG OLLAMA_BASE_URL=https://api.neuronetz.ai
ARG OLLAMA_EMBED_MODEL=nomic-embed-text
ARG EMBED_PROVIDER=ollama
ARG OPENAI_API_KEY=""
ENV OLLAMA_BASE_URL=$OLLAMA_BASE_URL
ENV OLLAMA_EMBED_MODEL=$OLLAMA_EMBED_MODEL
ENV EMBED_PROVIDER=$EMBED_PROVIDER
ENV OPENAI_API_KEY=$OPENAI_API_KEY
RUN node scripts/build-oracle-index.mjs || true
# Build the static site + SSR entry.
RUN npm run build:site
# Build the LoRA training corpus as a side artifact (deterministic, no API).
RUN node scripts/build-corpus.mjs || true
RUN npm prune --omit=dev
# ----------- Stage 2: runtime -----------------------------------------------
FROM node:22-alpine AS runtime
WORKDIR /app
ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=4321
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/public ./public
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
EXPOSE 4321
USER node
CMD ["node", "./dist/server/entry.mjs"]