Sayedev commited on
Commit
3652c72
·
verified ·
1 Parent(s): 536f4ce

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Node.js 18 as base image
2
+ FROM node:18-alpine
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Copy package files
8
+ COPY package*.json ./
9
+
10
+ # Install dependencies
11
+ RUN npm ci --only=production
12
+
13
+ # Copy source code
14
+ COPY . .
15
+
16
+ # Build the application
17
+ RUN npm run build
18
+
19
+ # Expose required port (Hugging Face requirement)
20
+ EXPOSE 7860
21
+
22
+ # Set environment variables
23
+ ENV PORT=7860
24
+ ENV HOSTNAME=0.0.0.0
25
+
26
+ # Start command with correct port
27
+ CMD ["npm", "start"]