AutoMod/bot/Dockerfile

23 lines
544 B
Docker
Raw Normal View History

FROM node:18 as build
2022-07-12 18:07:17 +02:00
WORKDIR /build/app
2023-04-12 22:01:30 +02:00
2022-07-12 18:07:17 +02:00
COPY bot/package.json bot/yarn.lock bot/.yarnrc.yml ./
COPY bot/.yarn ./.yarn
COPY lib ../lib
2023-04-12 22:01:30 +02:00
2022-07-15 18:03:51 +02:00
RUN yarn --cwd ../lib --immutable
2022-07-15 17:57:40 +02:00
RUN yarn --cwd ../lib build
2023-04-12 22:01:30 +02:00
RUN yarn install
2022-07-12 18:07:17 +02:00
COPY ./bot .
2021-10-10 20:11:03 +02:00
RUN yarn build
FROM node:18 as prod
2022-07-12 18:07:17 +02:00
WORKDIR /app/bot
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 07:18:03 +02:00
RUN yarn install --immutable
2021-10-10 20:11:03 +02:00
CMD ["yarn", "start"]