File size: 1,168 Bytes
462a607
 
a5e182d
462a607
 
 
a5e182d
462a607
 
 
 
 
 
 
 
 
 
1db76ed
462a607
 
a5e182d
462a607
 
a5e182d
462a607
 
a5e182d
 
 
462a607
a5e182d
 
462a607
a5e182d
1db76ed
462a607
a5e182d
 
 
462a607
a5e182d
462a607
 
a5e182d
 
 
 
 
 
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
41
42
43
44
45
46
47
48
49
50
FROM python:3.10-slim

# Set timezone
ENV TZ=Asia/Kolkata
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Install required system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
    gdb \
    git \
    gcc \
    python3-dev \
    ffmpeg \
    mediainfo \
    neofetch && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy project files
COPY . .

# Avoid pip permission issues
ENV PIP_ROOT_USER_ACTION=ignore

# Install Python dependencies
RUN pip install --upgrade pip && \
    pip install --no-cache-dir -r requirements.txt

# (Optional) Skip or modify if installer.sh fails
RUN [ -f installer.sh ] && bash installer.sh || true

# Fix Git ownership warning
RUN git config --system --add safe.directory /app

# Set folder permissions
RUN mkdir -p /app/sessions /app/resources/auth /app/tmp /app/pdf && \
    chmod -R 777 /app/sessions /app/resources /app/tmp /app/pdf

# Set PYTHONPATH
ENV PYTHONPATH="${PYTHONPATH}:/app"

# Copy entrypoint
COPY entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh

# Run the bot/server
CMD ["/app/entrypoint.sh"]