chore: fix dockerfile
This commit is contained in:
parent
dffaaa8acc
commit
4c737e0244
10
Dockerfile
10
Dockerfile
|
|
@ -13,8 +13,8 @@ FROM base as deps
|
||||||
RUN mkdir /app
|
RUN mkdir /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ADD package.json package-lock.json ./
|
ADD package.json yarn.lock ./
|
||||||
RUN npm install --production=false
|
RUN yarn install
|
||||||
|
|
||||||
# Setup production node_modules
|
# Setup production node_modules
|
||||||
FROM base as production-deps
|
FROM base as production-deps
|
||||||
|
|
@ -23,8 +23,8 @@ RUN mkdir /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=deps /app/node_modules /app/node_modules
|
COPY --from=deps /app/node_modules /app/node_modules
|
||||||
ADD package.json package-lock.json ./
|
ADD package.json yarn.lock ./
|
||||||
RUN npm prune --production
|
RUN yarn install
|
||||||
|
|
||||||
# Build the app
|
# Build the app
|
||||||
FROM base as build
|
FROM base as build
|
||||||
|
|
@ -38,7 +38,7 @@ ADD prisma .
|
||||||
RUN npx prisma generate
|
RUN npx prisma generate
|
||||||
|
|
||||||
ADD . .
|
ADD . .
|
||||||
RUN npm run build
|
RUN yarn build
|
||||||
|
|
||||||
# Finally, build the production image with minimal footprint
|
# Finally, build the production image with minimal footprint
|
||||||
FROM base
|
FROM base
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue