comfyuiman commited on
Commit
a0ddff4
·
verified ·
1 Parent(s): cd3f86a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CHANGED: Updated to Node 20 to support @google/genai
2
+ FROM node:20-alpine
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # 1. Install dependencies
8
+ COPY package.json package-lock.json* ./
9
+ RUN npm install
10
+
11
+ # 2. Copy app files
12
+ COPY . .
13
+
14
+ # 3. Build the app
15
+ RUN npm run build
16
+
17
+ # 4. Fix Permissions for Hugging Face
18
+ RUN chown -R node:node /app
19
+
20
+ # 5. Switch User
21
+ USER node
22
+
23
+ # 6. Expose Port
24
+ EXPOSE 7860
25
+
26
+ # 7. Start Command
27
+ CMD ["npx", "vite", "preview", "--host", "0.0.0.0", "--port", "7860"]