Phase 2 and 3 of the platform rework. - Neutral request/response contract: external_id, metadata, X-AI-Key, run_id in the response; client-specific fields removed. - AI profile is a revision table: saving creates an inactive revision, activation is separate, try-run does not store a run. One chat-completions gateway serves AIHub and OpenAI-compatible profiles. - Add between and in rule operators. - Contracts moved to contracts/lead-scoring/ with a score-response fixture. - Admin Web updated for revisions, runs and the neutral fixture. - Consolidate tests; remove rewrite_architect.md and the stale handoff doc; rewrite spec, CONTEXT and ARCHITECTURE for the current design. Not verified: live AIHub/OpenAI behavior, Omni/EMS integration.
20 lines
662 B
Docker
20 lines
662 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM oven/bun:1.4.0 AS build
|
|
WORKDIR /app
|
|
COPY apps/web/package.json apps/web/bun.lock ./
|
|
RUN bun install --frozen-lockfile
|
|
COPY apps/web/ ./
|
|
COPY contracts/lead-scoring/openapi.json /contracts/lead-scoring/openapi.json
|
|
COPY contracts/lead-scoring/fixtures/run-request.json /contracts/lead-scoring/fixtures/run-request.json
|
|
RUN bun run build
|
|
|
|
FROM oven/bun:1.4.0 AS runtime
|
|
ENV NODE_ENV=production HOST=0.0.0.0 PORT=3000
|
|
WORKDIR /app
|
|
COPY apps/web/package.json apps/web/bun.lock ./
|
|
RUN bun install --production --frozen-lockfile
|
|
COPY --from=build --chown=bun:bun /app/build ./build
|
|
USER bun
|
|
EXPOSE 3000
|
|
CMD ["bun", "build/index.js"]
|