mirror of
https://github.com/alexandrev/xslt-lab.git
synced 2026-09-13 08:43:16 +00:00
1d8faf6b3e
- gzip level 6 for JS, CSS, JSON, SVG, fonts - immutable cache (1yr) for hashed JS/CSS assets - 7-day cache for static assets (SVG, fonts, images) - no-store for env.js (runtime config must be fresh) - no-cache for HTML (SPA index) Reduces JS transfer from ~460KB to ~115KB gzip. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
372 B
Docker
17 lines
372 B
Docker
# Stage 1: build the frontend
|
|
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npm run build
|
|
|
|
# Stage 2: serve the static files
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
EXPOSE 80
|
|
CMD ["/entrypoint.sh"]
|