very tired
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -3,28 +3,14 @@ FROM node:20 AS node_base
|
||||
# Set the working directory
|
||||
WORKDIR /app
|
||||
|
||||
FROM node_base AS node_modules
|
||||
|
||||
# Copy the package.json and package-lock.json
|
||||
COPY package*.json ./
|
||||
|
||||
# Enable legacy peer deps
|
||||
RUN npm config set legacy-peer-deps true
|
||||
|
||||
COPY . .
|
||||
|
||||
# Install the dependencies
|
||||
RUN npm install
|
||||
|
||||
FROM node_base AS build
|
||||
|
||||
# Copy the source code
|
||||
|
||||
COPY . .
|
||||
|
||||
FROM build AS runtime
|
||||
|
||||
# Copy the node_modules
|
||||
|
||||
COPY --from=node_modules /app/node_modules ./node_modules
|
||||
|
||||
# Generate the Prisma client
|
||||
RUN npm run prisma:generate
|
||||
|
||||
Reference in New Issue
Block a user