2024-04-26 23:08:24 +02:00
|
|
|
FROM node:18-alpine AS builder
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
COPY . /app
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
RUN cd /app && yarn install && yarn build
|
2024-04-13 23:34:10 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
FROM node:18-alpine
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
RUN mkdir /app
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
COPY --from=builder /app/build /app/build
|
|
|
|
COPY --from=builder /app/package.json /app/yarn.lock /app/
|
2024-04-13 23:34:10 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
RUN cd /app && \
|
|
|
|
yarn install --production &&\
|
|
|
|
yarn cache clean
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
WORKDIR /app
|
2024-04-26 17:30:48 +02:00
|
|
|
|
2024-04-26 23:08:24 +02:00
|
|
|
CMD ["node", "build/index.js"]
|