2026-04-08 15:31:33 -04:00
|
|
|
# Stage 1: Install dependencies (dev deps needed for esbuild)
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
FROM node:20-alpine AS deps
|
|
|
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
2026-04-08 15:31:33 -04:00
|
|
|
RUN pnpm install --frozen-lockfile --prod=false
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
|
2026-04-08 15:31:33 -04:00
|
|
|
# Stage 2: Build the worker bundle
|
|
|
|
|
FROM node:20-alpine AS builder
|
|
|
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
COPY --from=deps /app/node_modules ./node_modules
|
2026-04-08 15:31:33 -04:00
|
|
|
COPY . .
|
|
|
|
|
ENV SKIP_ENV_VALIDATION=1
|
|
|
|
|
RUN pnpm build:worker
|
|
|
|
|
|
|
|
|
|
# Stage 3: Production runner (prod deps only)
|
|
|
|
|
FROM node:20-alpine AS runner
|
|
|
|
|
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
COPY package.json pnpm-lock.yaml ./
|
|
|
|
|
RUN pnpm install --frozen-lockfile --prod
|
|
|
|
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 worker
|
|
|
|
|
COPY --from=builder --chown=worker:nodejs /app/dist/worker.js ./worker.js
|
Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM,
PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source
files covering clients, berths, interests/pipeline, documents/EOI,
expenses/invoices, email, notifications, dashboard, admin, and
client portal. CI/CD via Gitea Actions with Docker builds.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 11:52:51 +01:00
|
|
|
USER worker
|
|
|
|
|
CMD ["node", "worker.js"]
|