mirror of
https://github.com/Dvorinka/Primora.git
synced 2026-10-28 15:51:23 +00:00
Port IMS telemetry into Primora conventions: - core.components/core.events (migration 00004 + sqlc) scoped to projects - POST /api/v1/ingest — single or <=500-event batches via project prm_ keys (X-Primora-Key alias), auto-registering components, permissive CORS - Issues: fingerprint-grouped errors with count/severity/first+last seen - Reads: events w/ filters + before-cursor, components, stats (1h/24h/7d/30d bucketed series + component health + totals + metric names), metric series (avg/p50/p95/max) - GET .../telemetry/stream — project-scoped SSE through an in-process hub (buffered subs, drop-on-slow, 25s keepalives); ?api_key=/?token= auth for EventSource - Telemetry page: health/issues/events/metrics/integrate tabs, live badge, 390px-clean; demo stubs - @primora/client SDK (createPrimoraClient: capture*/heartbeat/installAuto, queued keepalive flushes) - MCP: primora_list_issues/list_events/telemetry_stats/metric_series - IMS README deprecation note pointing here Also fixes workspace pins to 0.3.0 — npm ci in the frontend image was resolving the unpublished 0.2.0 spec from the registry. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
41 lines
1.1 KiB
Docker
41 lines
1.1 KiB
Docker
FROM node:22-alpine AS builder
|
|
WORKDIR /app
|
|
|
|
# Copy root configs for workspace context
|
|
COPY package.json package-lock.json tsconfig.base.json ./
|
|
COPY apps/auth/package.json ./apps/auth/package.json
|
|
COPY apps/cli/package.json ./apps/cli/package.json
|
|
COPY apps/frontend/package.json ./apps/frontend/package.json
|
|
COPY apps/mcp/package.json ./apps/mcp/package.json
|
|
COPY packages/api-client/package.json ./packages/api-client/package.json
|
|
COPY packages/client/package.json ./packages/client/package.json
|
|
COPY packages/shared-types/package.json ./packages/shared-types/package.json
|
|
|
|
RUN npm ci
|
|
|
|
# Copy full source
|
|
COPY . .
|
|
|
|
# Generate client
|
|
RUN npm run generate:client
|
|
|
|
# Build frontend
|
|
WORKDIR /app/apps/frontend
|
|
RUN npm run build
|
|
|
|
# Stage 2: Serve with Nginx
|
|
FROM nginx:1.27-alpine
|
|
COPY --from=builder /app/apps/frontend/dist /usr/share/nginx/html
|
|
# Add simple nginx config for SPA routing
|
|
RUN echo 'server { \
|
|
listen 80; \
|
|
location / { \
|
|
root /usr/share/nginx/html; \
|
|
index index.html; \
|
|
try_files $uri $uri/ /index.html; \
|
|
} \
|
|
}' > /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
CMD ["nginx", "-g", "daemon off;"]
|