lastdefiance20 commited on
Commit
472c021
·
verified ·
1 Parent(s): ffdee41

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Stage 1: Build
2
+ FROM node:20-alpine AS builder
3
+
4
+ RUN apk add --no-cache git
5
+
6
+ ARG CACHE_BUST=2026-03-09
7
+ RUN git clone --depth 1 https://github.com/cloneisyou/dataset-visualizer /workspace
8
+
9
+ WORKDIR /workspace
10
+ RUN npm ci && npm run build
11
+
12
+ # Stage 2: Serve with nginx
13
+ FROM nginx:alpine
14
+ ARG CACHE_BUST=2026-03-09
15
+ RUN echo "Cache bust: $CACHE_BUST"
16
+
17
+ COPY --from=builder /workspace/dist /usr/share/nginx/html
18
+ COPY --from=builder /workspace/nginx.conf /etc/nginx/conf.d/default.conf
19
+
20
+ # HuggingFace Spaces uses port 7860
21
+ EXPOSE 7860
22
+ CMD ["nginx", "-g", "daemon off;"]