Fix Docker build: provide DATABASE_URL for Prisma generate
This commit is contained in:
@@ -9,6 +9,7 @@ RUN npm install
|
||||
|
||||
# Build the application
|
||||
COPY . .
|
||||
ENV DATABASE_URL="file:./prisma/dev.db"
|
||||
RUN npx prisma generate
|
||||
RUN npm run build
|
||||
|
||||
@@ -18,6 +19,7 @@ WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV PORT=3000
|
||||
ENV DATABASE_URL="file:./prisma/dev.db"
|
||||
|
||||
# Install production dependencies only
|
||||
COPY package*.json ./
|
||||
|
||||
Reference in New Issue
Block a user