13 lines
478 B
Docker
13 lines
478 B
Docker
FROM node:20-alpine AS build
|
|
WORKDIR /app
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
COPY index.html vite.config.js links.json ./
|
|
COPY public ./public
|
|
COPY src ./src
|
|
RUN npm run build
|
|
|
|
FROM nginx:alpine
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
RUN printf 'server {\n listen 80;\n root /usr/share/nginx/html;\n location /assets/ { expires max; add_header Cache-Control "public, immutable"; }\n location / { try_files $uri /index.html; }\n}\n' > /etc/nginx/conf.d/default.conf
|