old-automod/api/Dockerfile

20 lines
553 B
Docker
Raw Permalink Normal View History

FROM node:18 as build
2022-07-12 16:07:17 +00:00
WORKDIR /build/app
COPY api/package.json api/yarn.lock api/.yarnrc.yml ./
COPY api/.yarn ./.yarn
COPY lib ../lib
2022-07-15 16:03:51 +00:00
RUN yarn --cwd ../lib --immutable
2022-07-15 15:57:40 +00:00
RUN yarn --cwd ../lib build
2022-07-09 05:18:03 +00:00
RUN yarn install --immutable
2022-07-12 16:07:17 +00:00
COPY ./api .
RUN yarn build
FROM node:18 as prod
2022-07-12 16:07:17 +00:00
WORKDIR /app/api
COPY --from=build /build/app/package.json /build/app/yarn.lock /build/app/.yarnrc.yml ./
COPY --from=build /build/app/.yarn ./.yarn
COPY --from=build /build/app/dist ./dist
COPY --from=build /build/lib ../lib
2022-07-09 05:18:03 +00:00
RUN yarn install --immutable
CMD ["yarn", "start"]