Files

19 lines
436 B
Docker
Raw Permalink Normal View History

2025-11-24 06:56:30 -03:00
FROM node:alpine AS build
WORKDIR /src
COPY . /src
# 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
FROM nginx:alpine-slim AS final
2025-08-22 22:07:08 -03:00
2025-11-22 23:43:49 -03:00
COPY nginx.conf /etc/nginx/nginx.conf
2025-08-22 22:07:08 -03:00
COPY . /usr/share/nginx/html
2025-11-24 06:56:30 -03:00
COPY --from=build /src/js /usr/share/nginx/html/js
2025-11-22 23:43:49 -03:00
2025-08-22 22:07:08 -03:00
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]