Raj728272 commited on
Commit
cca0d21
·
verified ·
1 Parent(s): 9475c27

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +42 -0
Dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-slim
2
+
3
+ # Install Python and required system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ python3 \
6
+ python3-pip \
7
+ python3-venv \
8
+ procps \
9
+ curl \
10
+ git \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+ # Create symlink for python
14
+ RUN ln -s /usr/bin/python3 /usr/bin/python
15
+
16
+ # Install PM2 globally
17
+ RUN npm install -g pm2
18
+
19
+ # Set working directory
20
+ WORKDIR /app
21
+
22
+ # Copy package files
23
+ COPY package*.json ./
24
+
25
+ # Install dependencies
26
+ RUN npm install
27
+
28
+ # Copy all source files
29
+ COPY . .
30
+
31
+ # Create required directories
32
+ RUN mkdir -p uploads bots
33
+
34
+ # Expose port (Hugging Face uses 7860)
35
+ EXPOSE 7860
36
+
37
+ # Set environment variables
38
+ ENV NODE_ENV=production
39
+ ENV PORT=7860
40
+
41
+ # Start the application
42
+ CMD ["node", "server.js"]