N8N-DASHBOARD/docker-compose.yml
David cd1a922976 Redesign dashboard as command center + capture error_message in poller
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
2026-08-23 19:11:29 +02:00

29 lines
1.1 KiB
YAML

# Coolify-ready compose for the n8n Workflow Monitor dashboard.
#
# In Coolify:
# 1. New Resource → Docker Compose
# 2. Point it at this file
# 3. Set the VITE_POCKETBASE_URL and VITE_N8N_URL env vars (in Coolify's env tab)
# 4. Deploy — Coolify injects Traefik labels automatically
#
# Standalone (docker compose up):
# 1. Copy .env.example to .env at this dir root and set the URLs
# 2. docker compose up --build
# 3. Open http://localhost:8080
services:
n8n-monitor-dashboard:
build:
context: ./dashboard
dockerfile: Dockerfile
args:
# Falls back to localhost if env var isn't set; Coolify should set this.
- VITE_POCKETBASE_URL=${VITE_POCKETBASE_URL:-http://127.0.0.1:8090}
- VITE_N8N_URL=${VITE_N8N_URL:-http://localhost:5678}
image: n8n-monitor-dashboard:latest
container_name: n8n-monitor-dashboard
restart: unless-stopped
# Map container port 80 → host 8080. Coolify will override routing via Traefik labels.
# If you're using Coolify, you can delete this ports block — Coolify sets its own.
ports:
- "8080:80"