Add dd0c Console — modular React dashboard with drift module
- Vite + React + TypeScript + Tailwind CSS
- Shell: auth provider, entitlement gate, dynamic sidebar
- Shared components: Button, Card, Table, Badge, Modal, EmptyState, PageHeader
- Drift module: dashboard, detail view, report viewer
- Module manifest pattern for pluggable product UIs
- Dockerfile: multi-stage node:22-slim → nginx:alpine
- 189KB JS + 17KB CSS (65KB gzipped)
2026-03-02 20:30:33 +00:00
|
|
|
FROM node:22-slim AS build
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY package.json package-lock.json* ./
|
|
|
|
|
RUN npm ci
|
|
|
|
|
COPY . .
|
|
|
|
|
RUN npm run build
|
|
|
|
|
|
|
|
|
|
FROM nginx:alpine
|
|
|
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
|
COPY <<'EOF' /etc/nginx/conf.d/default.conf
|
|
|
|
|
server {
|
|
|
|
|
listen 80;
|
|
|
|
|
root /usr/share/nginx/html;
|
|
|
|
|
index index.html;
|
2026-03-03 00:37:40 +00:00
|
|
|
|
|
|
|
|
# SPA fallback
|
Add dd0c Console — modular React dashboard with drift module
- Vite + React + TypeScript + Tailwind CSS
- Shell: auth provider, entitlement gate, dynamic sidebar
- Shared components: Button, Card, Table, Badge, Modal, EmptyState, PageHeader
- Drift module: dashboard, detail view, report viewer
- Module manifest pattern for pluggable product UIs
- Dockerfile: multi-stage node:22-slim → nginx:alpine
- 189KB JS + 17KB CSS (65KB gzipped)
2026-03-02 20:30:33 +00:00
|
|
|
location / {
|
|
|
|
|
try_files $uri $uri/ /index.html;
|
|
|
|
|
}
|
2026-03-03 00:37:40 +00:00
|
|
|
|
|
|
|
|
# Auth routes → alert service (any service works, they all share auth)
|
|
|
|
|
location /api/v1/auth/ {
|
|
|
|
|
proxy_pass http://alert:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Drift API
|
|
|
|
|
location /api/v1/stacks {
|
|
|
|
|
proxy_pass http://drift:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/reports {
|
|
|
|
|
proxy_pass http://drift:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/dashboard {
|
|
|
|
|
proxy_pass http://drift:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Alert API
|
|
|
|
|
location /api/v1/incidents {
|
|
|
|
|
proxy_pass http://alert:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/notifications {
|
|
|
|
|
proxy_pass http://alert:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/webhooks {
|
|
|
|
|
proxy_pass http://alert:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Portal API
|
|
|
|
|
location /api/v1/services {
|
|
|
|
|
proxy_pass http://portal:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Cost API
|
|
|
|
|
location /api/v1/anomalies {
|
|
|
|
|
proxy_pass http://cost:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/baselines {
|
|
|
|
|
proxy_pass http://cost:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/governance {
|
|
|
|
|
proxy_pass http://cost:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/ingest {
|
|
|
|
|
proxy_pass http://cost:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/cost {
|
|
|
|
|
proxy_pass http://cost:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Run API
|
|
|
|
|
location /api/v1/runbooks {
|
|
|
|
|
proxy_pass http://run:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
|
|
|
|
location /api/v1/approvals {
|
|
|
|
|
proxy_pass http://run:3000;
|
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
|
}
|
Add dd0c Console — modular React dashboard with drift module
- Vite + React + TypeScript + Tailwind CSS
- Shell: auth provider, entitlement gate, dynamic sidebar
- Shared components: Button, Card, Table, Badge, Modal, EmptyState, PageHeader
- Drift module: dashboard, detail view, report viewer
- Module manifest pattern for pluggable product UIs
- Dockerfile: multi-stage node:22-slim → nginx:alpine
- 189KB JS + 17KB CSS (65KB gzipped)
2026-03-02 20:30:33 +00:00
|
|
|
}
|
|
|
|
|
EOF
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|