ci: move prisma generate to launch stage

This commit is contained in:
Vasily Zubarev
2025-05-03 10:08:39 +02:00
parent 9a6f2d9c32
commit e0508be540
3 changed files with 2 additions and 2 deletions

View File

@@ -3,7 +3,6 @@ FROM node:23-slim AS base
# Default environment variables # Default environment variables
ENV PORT=7331 ENV PORT=7331
ENV NODE_ENV=production ENV NODE_ENV=production
ENV DATABASE_URL="postgresql://localhost:5432/taxhacker"
# Build stage # Build stage
FROM base AS builder FROM base AS builder

View File

@@ -14,6 +14,7 @@ echo "PostgreSQL server is ready!"
# Run database migrations # Run database migrations
echo "Running database migrations..." echo "Running database migrations..."
npx prisma generate
npx prisma migrate deploy npx prisma migrate deploy
# Start the application # Start the application

View File

@@ -5,7 +5,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "next dev -p 7331 --turbopack", "dev": "next dev -p 7331 --turbopack",
"build": "prisma generate && next build", "build": "next build",
"start": "prisma migrate deploy && next start", "start": "prisma migrate deploy && next start",
"lint": "next lint" "lint": "next lint"
}, },