new pipeline and build improvements
Some checks failed
Homepage Build and Deploy (Test) / Build Homepage Image (push) Successful in 32s
Homepage Build and Deploy (Test) / Deploy Homepage (push) Failing after 3s

This commit is contained in:
2026-07-10 17:06:16 -03:00
parent 9410d3a7c6
commit 72c7d6c9e0
14 changed files with 1969 additions and 190 deletions

View File

@@ -1,19 +1,18 @@
FROM node:alpine AS build
FROM node:22-alpine AS build
WORKDIR /src
COPY . /src
COPY package.json package-lock.json ./
RUN npm ci
# Install terser to minify JS files
RUN npm install -g terser
RUN if [ -d "js" ]; then find js -type f -name "*.js" -exec sh -c 'for f; do terser "$f" -c -m -o "$f"; done' sh {} +; fi
COPY . .
RUN OUTPUT_DIR=/dist npm run build:production
FROM nginx:alpine-slim AS final
COPY nginx.conf /etc/nginx/nginx.conf
COPY . /usr/share/nginx/html
COPY --from=build /src/js /usr/share/nginx/html/js
COPY --from=build /dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]