2023-05-13 17:10:37 +00:00
|
|
|
FROM node:lts-alpine as base
|
|
|
|
WORKDIR /base
|
|
|
|
COPY ./package.json ./package.json
|
|
|
|
RUN yarn install
|
|
|
|
COPY ./ ./
|
|
|
|
|
|
|
|
FROM base AS dev
|
|
|
|
ENV NODE_ENV=development
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["yarn","dev"]
|
|
|
|
|
|
|
|
FROM base AS build
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
WORKDIR /build
|
|
|
|
COPY --from=base /base ./
|
2023-05-17 16:00:40 +00:00
|
|
|
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
2023-05-13 17:10:37 +00:00
|
|
|
RUN yarn build
|
|
|
|
|
|
|
|
FROM nginx:stable AS prod
|
|
|
|
COPY --from=build /build/dist /usr/share/nginx/html
|
2023-05-17 07:18:08 +00:00
|
|
|
EXPOSE 3000
|