N8N-DASHBOARD/dashboard/Dockerfile
David c3d42e54bb Initial commit: n8n workflow monitor dashboard
- Vite + React + Tailwind SPA reading from PocketBase
- Realtime subscriptions on workflows + executions collections
- Coolify-ready Dockerfile (multi-stage node build → nginx serve)
- PocketBase URL configurable via VITE_POCKETBASE_URL build arg
- Schema import (workflows, executions) included
2026-08-23 15:47:51 +02:00

33 lines
879 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
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;"]