mruniquehacker commited on
Commit
15321d2
·
verified ·
1 Parent(s): 7c6a88c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -6
Dockerfile CHANGED
@@ -1,14 +1,26 @@
1
  FROM node:lts-buster
2
- USER root
 
3
  RUN apt-get update && \
4
  apt-get install -y ffmpeg webp git && \
5
  apt-get upgrade -y && \
6
  rm -rf /var/lib/apt/lists/*
7
- USER node
8
- RUN git clone https://github.com/vaibhavk10/Knightbot-main /home/node/Knightbot
9
- WORKDIR /home/node/Knightbot
10
- RUN chmod -R 777 /home/node/Knightbot/
 
 
11
  RUN yarn install --network-concurrency 1
 
 
 
 
 
12
  EXPOSE 7860
 
 
13
  ENV NODE_ENV=production
14
- CMD ["npm", "start"]
 
 
 
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
+ # Clone the repository
10
+ RUN git clone https://github.com/vaibhavk10/Knightbot /app
11
+ WORKDIR /app
12
+
13
+ # Install dependencies
14
  RUN yarn install --network-concurrency 1
15
+
16
+ # Set permissions
17
+ RUN chmod -R 777 .
18
+
19
+ # Expose port for Hugging Face
20
  EXPOSE 7860
21
+
22
+ # Set production environment
23
  ENV NODE_ENV=production
24
+
25
+ # Start the bot
26
+ CMD ["node", "index.js"]