File size: 482 Bytes
3570fe8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Build the Vite app, then serve the static bundle with nginx.
# HF Spaces docker SDK: the container must listen on app_port (8080);
# nginx-unprivileged listens on 8080 by default and runs as non-root,
# which is exactly what Spaces expects.

FROM node:22-alpine AS build
WORKDIR /build
COPY app/package.json app/package-lock.json ./
RUN npm ci
COPY app/ ./
RUN npm run build

FROM nginxinc/nginx-unprivileged:alpine
COPY --from=build /build/dist /usr/share/nginx/html
EXPOSE 8080