Next.js + NestJS + Prisma (MySQL) monorepo replacing the legacy PHP internal app. Includes a session-based auth module with Argon2 password hashing and global input validation (replacing the old app's SQL injection and plaintext password comparison), the full target Prisma schema for customers/insurance/utilities/shared ledger/bank register, Docker Compose + Dockerfiles, and an Access-to-staging migration pipeline (migration/) already run against the real source databases. See PLAN.md and RESUME.md for the full architecture and session history.
21 lines
507 B
Docker
21 lines
507 B
Docker
FROM node:20-alpine AS base
|
|
WORKDIR /repo
|
|
|
|
FROM base AS deps
|
|
COPY package.json package-lock.json* ./
|
|
COPY apps/web/package.json apps/web/package.json
|
|
RUN npm install --workspace=apps/web --no-audit --no-fund
|
|
|
|
FROM deps AS build
|
|
COPY apps/web apps/web
|
|
RUN npm run build -w apps/web
|
|
|
|
FROM node:20-alpine AS runtime
|
|
WORKDIR /repo
|
|
ENV NODE_ENV=production
|
|
COPY --from=build /repo/node_modules node_modules
|
|
COPY --from=build /repo/apps/web apps/web
|
|
EXPOSE 3000
|
|
WORKDIR /repo/apps/web
|
|
CMD ["npx", "next", "start"]
|