comfyuiman commited on
Commit
d8882bf
·
verified ·
1 Parent(s): 7946263

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-alpine
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy package.json first to ensure it exists for npm install
6
+ COPY package.json ./
7
+
8
+ # Install dependencies
9
+ RUN npm install
10
+
11
+ # Copy the rest of the application code
12
+ COPY . .
13
+
14
+ # Build the React application
15
+ # This will use the API_KEY environment variable if provided during build
16
+ RUN npm run build
17
+
18
+ # Expose port 7860 (Required by Hugging Face Spaces)
19
+ EXPOSE 7860
20
+
21
+ # Start the Vite preview server
22
+ CMD ["npm", "run", "preview"]