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