2 changed files with 23 additions and 10 deletions
@ -1,14 +1,13 @@ |
|||||||
FROM node:18.7.0 |
FROM node:22.13.1-alpine AS build |
||||||
|
|
||||||
WORKDIR /app |
WORKDIR /app |
||||||
|
|
||||||
COPY package.json package.json |
COPY package.json ./ |
||||||
COPY yarn.lock yarn.lock |
COPY package-lock.json ./ |
||||||
|
RUN npm install |
||||||
|
COPY . ./ |
||||||
|
RUN npm run build |
||||||
|
|
||||||
RUN yarn |
EXPOSE 80 |
||||||
|
FROM nginx:1.19-alpine |
||||||
COPY . . |
COPY --from=build /app/build /usr/share/nginx/html |
||||||
|
|
||||||
RUN yarn build |
|
||||||
|
|
||||||
CMD [ "yarn", "preview", "--host" ] |
|
||||||
Loading…
Reference in new issue