File size: 955 Bytes
613e60d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f6821eb
6b37889
613e60d
 
ce187b4
 
 
f6821eb
a345285
613e60d
 
 
 
 
 
 
 
 
 
f6821eb
6b37889
613e60d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  FROM python:3.10-slim
  
  ENV TZ=Asia/Kolkata
  RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
  
  RUN apt-get update && apt-get install -y --no-install-recommends \
      git gcc python3-dev ffmpeg mediainfo neofetch && \
      apt-get clean && rm -rf /var/lib/apt/lists/*
  
  WORKDIR /app
  
  COPY . .
  
  ENV PIP_ROOT_USER_ACTION=ignore
  
  RUN pip install --upgrade pip
  RUN pip install --no-cache-dir -r requirements.txt
  ##RUN pip install  uvicorn fastapi

  
  RUN bash installer.sh

  # Fix for Git's 'dubious ownership' error
  RUN git config --global --add safe.directory /app
  

  
  # Ensure writable dirs
  RUN mkdir -p /app/sessions && chmod -R 777 /app/sessions
  RUN mkdir -p /app/resources/auth && chmod -R 777 /app/resources
  RUN mkdir -p /app/tmp && chmod -R 777 /app/tmp
  RUN mkdir -p /app/pdf && chmod -R 777 /app/pdf
  
  
  ENV PYTHONPATH="${PYTHONPATH}:/app"
  
  CMD bash startup