Spaces:
Paused
Paused
| 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"] |