Files
rain_website/Dockerfile.k8s
T
rainyy21 ef599015b5 make k8s
2026-10-06 01:53:53 -04:00

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