Complete rebuild of 22-year-old PHP CMS as modern SaaS: Database (15 migrations, 42+ tables): - Foundation: account_settings, audit_log, GDPR register, cms_files - Module Engine: modules, fields, records, permissions, relations + RPC - Members: 45+ field member profiles, departments, roles, honors, SEPA mandates - Courses: courses, sessions, categories, instructors, locations, attendance - Bookings: rooms, guests, bookings with availability - Events: events, registrations, holiday passes - Finance: SEPA batches/items (pain.008/001 XML), invoices - Newsletter: campaigns, templates, recipients, subscriptions - Site Builder: site_pages (Puck JSON), site_settings, cms_posts - Portal Auth: member_portal_invitations, user linking Feature Packages (9): - @kit/module-builder — dynamic low-code CRUD engine - @kit/member-management — 31 API methods, 21 actions, 8 components - @kit/course-management, @kit/booking-management, @kit/event-management - @kit/finance — SEPA XML generator + IBAN validator - @kit/newsletter — campaigns + dispatch - @kit/document-generator — PDF/Excel/Word - @kit/site-builder — Puck visual editor, 15 blocks, public rendering Pages (60+): - Dashboard with real stats from all APIs - Full CRUD for all 8 domains with react-hook-form + Zod - Recharts statistics - German i18n throughout - Member portal with auth + invitation system - Public club websites via Puck at /club/[slug] Infrastructure: - Dockerfile (multi-stage, standalone output) - docker-compose.yml (Supabase self-hosted + Next.js) - Kong API gateway config - .env.production.example
51 lines
1.3 KiB
Docker
51 lines
1.3 KiB
Docker
# =====================================================
|
|
# MyEasyCMS v2 — Production Dockerfile
|
|
# Multi-stage build for Next.js with pnpm
|
|
# =====================================================
|
|
|
|
FROM node:22-alpine AS base
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
WORKDIR /app
|
|
|
|
# --- Dependencies stage ---
|
|
FROM base AS deps
|
|
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json ./
|
|
COPY apps/web/package.json ./apps/web/package.json
|
|
COPY packages/ ./packages/
|
|
COPY tooling/ ./tooling/
|
|
RUN pnpm install --frozen-lockfile --prod=false
|
|
|
|
# --- Build stage ---
|
|
FROM base AS builder
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY --from=deps /app/packages/ ./packages/
|
|
COPY . .
|
|
|
|
# Set build-time env vars
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
ENV NEXT_PUBLIC_SITE_URL=https://myeasycms.de
|
|
|
|
RUN pnpm --filter web build
|
|
|
|
# --- Production stage ---
|
|
FROM node:22-alpine AS runner
|
|
WORKDIR /app
|
|
|
|
ENV NODE_ENV=production
|
|
ENV NEXT_TELEMETRY_DISABLED=1
|
|
|
|
RUN addgroup --system --gid 1001 nodejs
|
|
RUN adduser --system --uid 1001 nextjs
|
|
|
|
# Copy built app
|
|
COPY --from=builder /app/apps/web/.next/standalone ./
|
|
COPY --from=builder /app/apps/web/.next/static ./apps/web/.next/static
|
|
COPY --from=builder /app/apps/web/public ./apps/web/public
|
|
|
|
USER nextjs
|
|
EXPOSE 3000
|
|
ENV PORT=3000
|
|
ENV HOSTNAME="0.0.0.0"
|
|
|
|
CMD ["node", "apps/web/server.js"]
|