Ufoptg commited on
Commit
5ec8eb2
1 Parent(s): 78b07ad

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +36 -29
Dockerfile CHANGED
@@ -1,29 +1,36 @@
1
- FROM python:3.9.5-buster
2
-
3
- RUN apt-get update
4
-
5
- RUN apt-get install --no-install-recommends -y python3-dev python3-pip python3-virtualenv git mediainfo nano ffmpeg unzip
6
-
7
- COPY ./reqs.txt /Hellbot/reqs.txt
8
-
9
- RUN pip3 install --no-cache-dir -U -r /Hellbot/reqs.txt
10
-
11
- WORKDIR /Hellbot
12
-
13
- RUN pip3 install -U pip
14
-
15
- COPY . .
16
-
17
- RUN chown -R 1000:0 .
18
- RUN chmod 777 .
19
- RUN chown -R 1000:0 /usr
20
- RUN chmod 777 /usr
21
-
22
- EXPOSE 7860
23
-
24
- # Add a script for periodic redeployment
25
- COPY start.sh /Hellbot/start.sh
26
- RUN chmod +x /Hellbot/start.sh
27
-
28
- # Run the restart script
29
- CMD ["bash", "-c", "python3 server.py & /Hellbot/start.sh"]
 
 
 
 
 
 
 
 
1
+ FROM python:3.9.5-buster
2
+
3
+ # Install dependencies
4
+ RUN apt-get update && \
5
+ apt-get install --no-install-recommends -y \
6
+ python3-dev \
7
+ python3-pip \
8
+ python3-virtualenv \
9
+ git \
10
+ mediainfo \
11
+ nano \
12
+ ffmpeg \
13
+ unzip && \
14
+ apt-get clean && \
15
+ rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements and install them
18
+ COPY ./reqs.txt /Hellbot/reqs.txt
19
+ RUN pip3 install --no-cache-dir -U -r /Hellbot/reqs.txt
20
+
21
+ # Set working directory
22
+ WORKDIR /Hellbot
23
+
24
+ # Copy the application code
25
+ COPY . .
26
+
27
+ # Set appropriate permissions
28
+ RUN chown -R 1000:0 /Hellbot && \
29
+ chmod -R 755 /Hellbot && \
30
+ chmod +x /Hellbot/start.sh
31
+
32
+ # Expose port
33
+ EXPOSE 7860
34
+
35
+ # Start the application using the start.sh script
36
+ CMD ["./start.sh"]