Dashboard: - Dark theme by default (zinc-950 background, high-contrast status colors) - Layout: sticky header with live status, hero HealthBanner, FailuresPanel, AnomaliesPanel, 2-col grid (Workflows + Activity), StatsStrip footer - Auto-detected anomalies: stale active workflows, 100% fail rate, stuck running - Click any failure/activity row → links to n8n execution view (VITE_N8N_URL) - VITE_N8N_URL env var threaded through Dockerfile + compose Poller (poller.n8n.json): - Fetch n8n Executions: includeData false → true (now includes execution data) - Create/Update Execution Record: extract error_message from data.resultData.error using a safe IIFE that JSON.parses the data field Also: - Added vite-env.d.ts so VITE_* env vars are typed - docker-compose.yml: VITE_N8N_URL added to build args - .env.example: documented VITE_N8N_URL at root and dashboard level
37 lines
999 B
Docker
37 lines
999 B
Docker
# syntax=docker/dockerfile:1.7
|
|
|
|
# ---------- build stage ----------
|
|
FROM node:20-alpine AS build
|
|
|
|
WORKDIR /app
|
|
|
|
# Install deps in their own layer so source changes don't bust the cache.
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci
|
|
|
|
# PB URL is baked at build time — Vite reads it via import.meta.env.VITE_*.
|
|
# Set this as a build arg in Coolify (or docker compose).
|
|
ARG VITE_POCKETBASE_URL
|
|
ENV VITE_POCKETBASE_URL=$VITE_POCKETBASE_URL
|
|
|
|
# n8n base URL for deep-links from each failure/execution back to n8n.
|
|
ARG VITE_N8N_URL
|
|
ENV VITE_N8N_URL=$VITE_N8N_URL
|
|
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# ---------- runtime stage ----------
|
|
FROM nginx:1.27-alpine
|
|
|
|
# Replace default site config with our SPA-friendly one.
|
|
RUN rm /etc/nginx/conf.d/default.conf
|
|
COPY nginx.conf /etc/nginx/conf.d/
|
|
|
|
# Static bundle from the build stage.
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
EXPOSE 80
|
|
|
|
# Coolify/Traefik will route to this port; the page itself is served by nginx.
|
|
CMD ["nginx", "-g", "daemon off;"]
|