Initial commit: WebGPU portfolio — generative-art site with DOM overlay
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
# ---- stage 1: build ----
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
|
||||
# Install deps (cache layer)
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci
|
||||
|
||||
# Copy source and build
|
||||
COPY tsconfig.json vite.config.ts index.html ./
|
||||
COPY src/ src/
|
||||
RUN npm run build
|
||||
|
||||
# ---- stage 2: serve ----
|
||||
FROM nginx:alpine-slim AS serve
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
# Optional: custom nginx config for caching / security
|
||||
COPY nginx.default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Reference in New Issue
Block a user