mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #369 from omnivore-app/fix/multistage-docker-deps
Only install dev deps on the prod image
This commit is contained in:
commit
269ba7c03e
1 changed files with 2 additions and 5 deletions
|
|
@ -2,7 +2,6 @@ FROM node:14.18-alpine as builder
|
|||
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV development
|
||||
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
|
||||
|
||||
COPY package.json .
|
||||
|
|
@ -14,7 +13,7 @@ COPY .eslintrc .
|
|||
COPY /packages/readabilityjs/package.json ./packages/readabilityjs/package.json
|
||||
COPY /packages/api/package.json ./packages/api/package.json
|
||||
|
||||
RUN yarn install --pure-lockfile --development
|
||||
RUN yarn install --pure-lockfile
|
||||
|
||||
ADD /packages/readabilityjs ./packages/readabilityjs
|
||||
ADD /packages/api ./packages/api
|
||||
|
|
@ -23,7 +22,6 @@ RUN yarn
|
|||
RUN yarn workspace @omnivore/api build
|
||||
|
||||
|
||||
|
||||
FROM node:14.18-alpine as runner
|
||||
|
||||
WORKDIR /app
|
||||
|
|
@ -35,10 +33,9 @@ ENV PORT=8080
|
|||
COPY --from=builder /app/packages/api/dist /app/packages/api/dist
|
||||
COPY --from=builder /app/packages/readabilityjs/ /app/packages/readabilityjs/
|
||||
COPY --from=builder /app/packages/api/package.json /app/packages/api/package.json
|
||||
COPY --from=builder /app/packages/api/node_modules /app/packages/api/node_modules
|
||||
COPY --from=builder /app/node_modules /app/node_modules
|
||||
COPY --from=builder /app/package.json /app/package.json
|
||||
COPY --from=builder /app/packages/api/index_settings.json /app/packages/api/index_settings.json
|
||||
RUN yarn install --production
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue