diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..0f59a68 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,3 @@ +node_modules +dist +test-results diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 6a0aba9..16ddce1 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -4,15 +4,16 @@ ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable -FROM base AS prod +FROM base AS build WORKDIR /app COPY pnpm-lock.yaml ./ -RUN pnpm fetch --prod +RUN pnpm fetch COPY . ./ +RUN pnpm install --offline --frozen-lockfile RUN pnpm run build -FROM nginx:1.30-alpine -COPY --from=prod /app/dist /usr/share/nginx/html -COPY nginx.conf /etc/nginx/conf.d/default.conf \ No newline at end of file +FROM nginx:1.31-alpine +COPY --from=build /app/dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf