negismohit123 commited on
Commit
67acec9
·
verified ·
1 Parent(s): b0375f8

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Node.js 18
2
+ FROM node:18-bullseye-slim
3
+
4
+ # Install system libraries required for FFmpeg (just in case static fails)
5
+ RUN apt-get update && apt-get install -y \
6
+ python3 \
7
+ build-essential \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Set working directory
11
+ WORKDIR /app
12
+
13
+ # Copy package files first (better caching)
14
+ COPY package*.json ./
15
+
16
+ # Install dependencies
17
+ RUN npm install
18
+
19
+ # Copy the rest of the app code
20
+ COPY . .
21
+
22
+ # Create a directory for permissions and switch to non-root user
23
+ RUN chown -R 1000:1000 /app
24
+ USER 1000
25
+
26
+ # Expose the port Hugging Face expects
27
+ EXPOSE 7860
28
+ ENV PORT=7860
29
+
30
+ # Start the server
31
+ CMD ["npm", "start"]