diff --git a/frontend/dockerfile b/frontend/dockerfile index a2c265d..42999c9 100644 --- a/frontend/dockerfile +++ b/frontend/dockerfile @@ -1,27 +1,13 @@ -# FROM node:20-alpine as build-stage -# WORKDIR /app -# COPY package*.json ./ -# RUN npm install -# COPY . . -# RUN npm run build - -# FROM node:20-alpine as production-stage -# WORKDIR /app -# COPY --from=build-stage /app /app -# EXPOSE 3000 -# ENV NODE_ENV=production -# CMD ["npm", "run", "start"] - - - -FROM node:20-slim +FROM node:20-alpine as build-stage WORKDIR /app COPY package*.json ./ - -RUN npm cache clean --force && \ - npm install --include=optional --legacy-peer-deps - +RUN npm install COPY . . RUN npm run build + +FROM node:20-alpine as production-stage +WORKDIR /app +COPY --from=build-stage /app /app EXPOSE 3000 -CMD ["npm", "start"] \ No newline at end of file +ENV NODE_ENV=production +CMD ["npm", "run", "start"]