File size: 1,384 Bytes
4da5dca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9ea3b5b
4da5dca
 
9ea3b5b
 
 
 
4da5dca
 
 
 
 
 
9ea3b5b
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
FROM ubuntu:24.04

# Switch to root
USER root

# Create the keyring directory, install packages, and set up Node.js
RUN apt-get update && apt-get upgrade -y \
    && mkdir -p /etc/apt/keyrings \
    && apt-get install --no-install-recommends -y \
    ca-certificates curl ffmpeg fonts-noto-color-emoji gcc git gnupg \
    python3 python3-pip python3-dev python3-lxml python3-psycopg2 \
    libmagickwand-dev libpq-dev mediainfo nano neofetch pv \
    screen tree unzip virtualenv wget zlib1g libyaml-dev \
    && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
    && NODE_MAJOR=18 \
    && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
    && apt-get update \
    && apt-get install nodejs -y \
    && rm -rf /var/lib/apt/lists/*

# Clone the repo
RUN git clone https://github.com/TgCatUB/catuserbot

# Switch directory
RUN chmod -R 777 catuserbot
WORKDIR catuserbot
ENV TZ=Asia/Kolkata
COPY . .

# Install dependencies
RUN pip install --no-cache-dir --break-system-packages -r requirements.txt
RUN pip install --no-cache-dir --break-system-packages sqlalchemy-cockroachdb

# Start userbot along with health checks server
CMD ["sh", "-c", "python3 -m http.server 7860 & python3 -m userbot"]