diff --git a/backend.Dockerfile b/backend.Dockerfile index c8a595fe..f2967423 100644 --- a/backend.Dockerfile +++ b/backend.Dockerfile @@ -6,7 +6,9 @@ COPY ./backend/package*.json ./ RUN npm install -COPY ./backend . +COPY ./backend ./backend + +WORKDIR /app/backend EXPOSE 2002 diff --git a/frontend.Dockerfile b/frontend.Dockerfile index 40cb0d4a..6491bb5f 100644 --- a/frontend.Dockerfile +++ b/frontend.Dockerfile @@ -1,13 +1,15 @@ # build stage -FROM node:22 as build-stage +FROM node:22 AS build-stage WORKDIR /app COPY ./frontend/package*.json ./ RUN npm install -COPY ./frontend . +COPY ./frontend ./frontend +COPY ./assets ./assets +WORKDIR /app/frontend RUN npm run build # production stage -FROM nginx:stable as production-stage -COPY --from=build-stage /app/dist /usr/share/nginx/html +FROM nginx:stable AS production-stage +COPY --from=build-stage /app/frontend/dist /usr/share/nginx/html EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file