Features: - Complete Ubuntu dependency resolution in requirements.txt - Safe Docker deployment that preserves existing bash startup setups - Isolated Docker environment (docker-ultroid/) with different ports - Automatic detection of existing bot configurations - Session generation scripts for Docker deployment - Health check and diagnostic tools - Comprehensive documentation and deployment guides Safety: - Detects existing 'bash startup' method and creates isolated environment - Uses different ports (8081) to avoid conflicts - Separate volumes and configs for Docker deployment - Both bash startup and Docker can run side by side - No interference with existing bot setups Files added/updated: - requirements.txt (all missing dependencies) - Docker setup (Dockerfile, docker-compose.yml, .env.sample) - Deployment scripts (ubuntu_setup.sh, docker-deploy.sh, quick-start.sh) - Safety scripts (safe-docker-setup.sh with isolation logic) - Management tools (Makefile, health_check.sh, generate-session.sh) - Documentation (SAFE_DOCKER_GUIDE.md, DOCKER_DEPLOYMENT.md, etc.) Ready for production Ubuntu server deployment!
60 lines
1.5 KiB
Docker
60 lines
1.5 KiB
Docker
# Ultroid - UserBot
|
|
# Copyright (C) 2021-2025 TeamUltroid
|
|
# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >
|
|
# PLease read the GNU Affero General Public License in <https://www.github.com/TeamUltroid/Ultroid/blob/main/LICENSE/>.
|
|
|
|
FROM python:3.11-slim
|
|
|
|
# Set timezone
|
|
ENV TZ=Asia/Kolkata
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
wget \
|
|
curl \
|
|
unzip \
|
|
ffmpeg \
|
|
mediainfo \
|
|
neofetch \
|
|
build-essential \
|
|
python3-dev \
|
|
libffi-dev \
|
|
libssl-dev \
|
|
libjpeg-dev \
|
|
libpng-dev \
|
|
libwebp-dev \
|
|
libopenjp2-7-dev \
|
|
libtiff5-dev \
|
|
libfreetype6-dev \
|
|
liblcms2-dev \
|
|
libxml2-dev \
|
|
libxslt1-dev \
|
|
zlib1g-dev \
|
|
libmagic1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /root/TeamUltroid
|
|
|
|
# Copy requirements and install Python dependencies
|
|
COPY requirements.txt .
|
|
COPY resources/ ./resources/
|
|
COPY re*/ ./re*/
|
|
|
|
# Install requirements following official method
|
|
RUN pip install --upgrade pip setuptools wheel
|
|
RUN pip install -U -r re*/st*/optional-requirements.txt || true
|
|
RUN pip install -U -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Create necessary directories and set permissions
|
|
RUN mkdir -p downloads uploads logs resources/session
|
|
RUN chmod +x startup sessiongen installer.sh
|
|
|
|
# Start the bot using official startup method
|
|
CMD ["bash", "startup"]
|