mruniquehacker commited on
Commit
b355979
·
verified ·
1 Parent(s): 17b5fea

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:lts-buster
2
+
3
+ # Install dependencies
4
+ RUN apt-get update && \
5
+ apt-get install -y ffmpeg webp git && \
6
+ apt-get upgrade -y && \
7
+ rm -rf /var/lib/apt/lists/*
8
+
9
+ # Create necessary directories with proper permissions
10
+ RUN mkdir -p /tmp/knightbot && \
11
+ chmod -R 777 /tmp/knightbot
12
+
13
+ # Clone the repository
14
+ RUN git clone https://github.com/vaibhavk10/Knightbot /app
15
+ WORKDIR /app
16
+
17
+ # Install dependencies
18
+ RUN yarn install --network-concurrency 1
19
+
20
+ # Set permissions for app directory
21
+ RUN chmod -R 777 /app
22
+
23
+ # Expose port for Hugging Face
24
+ EXPOSE 7860
25
+
26
+ # Set production environment ok
27
+ ENV NODE_ENV=production
28
+
29
+ # Start the bot
30
+ CMD ["node", "index.js"]