feat: Initialize Prisma database schema and update deployment scripts for robust migration handling.

This commit is contained in:
Moh Dzulfikri Maulana
2026-03-09 01:11:58 +07:00
parent ecd09904cf
commit 9abf68320a
6 changed files with 183 additions and 19 deletions

View File

@@ -16,13 +16,14 @@ RUN pnpm install --frozen-lockfile
# Stage 2: Build the app
FROM node:20-alpine AS builder
RUN apk add --no-cache libc6-compat
WORKDIR /app
RUN npm install -g pnpm
COPY --from=deps /app/node_modules ./node_modules
COPY . .
# Generate Prisma Client
RUN pnpm prisma generate
RUN DATABASE_URL="postgresql://user:password@localhost:5432/db" pnpm prisma generate
# Build Next.js
# Disable telemetry during build
@@ -31,6 +32,7 @@ RUN pnpm build
# Stage 3: Runner
FROM node:20-alpine AS runner
RUN apk add --no-cache libc6-compat
WORKDIR /app
ENV NODE_ENV production