├── .deepsource.toml ├── Dockerfile └── README.md /.deepsource.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | 3 | [[analyzers]] 4 | name = "docker" 5 | enabled = true -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.9-slim-bullseye 2 | 3 | WORKDIR /app/ 4 | 5 | RUN echo deb http://http.us.debian.org/debian/ testing non-free contrib main > /etc/apt/sources.list \ 6 | && apt-get update \ 7 | && apt-get clean 8 | 9 | RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ 10 | sudo \ 11 | git \ 12 | curl \ 13 | build-essential \ 14 | gnupg2 \ 15 | ffmpeg \ 16 | unzip \ 17 | wget \ 18 | jq 19 | 20 | RUN mkdir -p /tmp/ \ 21 | && cd /tmp/ \ 22 | && wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \ 23 | && dpkg -i ./google-chrome-stable_current_amd64.deb; apt-get install -fy --no-install-recommends \ 24 | && rm ./google-chrome-stable_current_amd64.deb 25 | 26 | RUN mkdir -p /tmp/ \ 27 | && cd /tmp/ \ 28 | && wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE)/chromedriver_linux64.zip \ 29 | && unzip /tmp/chromedriver.zip chromedriver -d /usr/bin/ \ 30 | && rm /tmp/chromedriver.zip 31 | 32 | ENV GOOGLE_CHROME_DRIVER=/usr/bin/chromedriver 33 | ENV GOOGLE_CHROME_BIN=/usr/bin/google-chrome-stable 34 | 35 | RUN mkdir -p /tmp/ \ 36 | && cd /tmp/ \ 37 | && wget -O /tmp/rarlinux.tar.gz http://www.rarlab.com/rar/rarlinux-x64-6.0.0.tar.gz \ 38 | && tar -xzvf rarlinux.tar.gz \ 39 | && cd rar \ 40 | && cp -v rar unrar /usr/bin/ \ 41 | && rm -rf /tmp/rar* 42 | 43 | ENV VIRTUAL_ENV=/opt/venv 44 | RUN python3 -m venv $VIRTUAL_ENV 45 | ENV PATH="$VIRTUAL_ENV/bin:$PATH" 46 | 47 | RUN git clone https://github.com/UsergeTeam/Userge . 48 | 49 | RUN python3 -m pip install -U \ 50 | pip \ 51 | wheel 52 | 53 | RUN pip3 install -Ur requirements.txt 54 | 55 | CMD [ "bash", "./run" ] 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Userge Docker 2 | 3 | > *WARNING! Railway does not support deployment of userbots and such on their free plan anymore. You can deploy USERGE on Railway but that'll definitely FREEZE YOUR ACCOUNT and then you can't deploy new projects or update existing projects without verifying your account by adding a payment method.* 4 | 5 | [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/new/template?template=https%3A%2F%2Fgithub.com%2Fculturecloud%2Fuserge-docker&envs=API_ID%2CAPI_HASH%2CHU_STRING_SESSION%2CBOT_TOKEN%2COWNER_ID%2CLOG_CHANNEL_ID%2CDATABASE_URL&API_IDDesc=Telegram+API+ID+%28get+it+from+https%3A%2F%2Fmy.telegram.org%29&API_HASHDesc=Telegram+API+hash+%28Get+it+from+https%3A%2F%2Fmy.telegram.org%29&HU_STRING_SESSIONDesc=Pyrogram+user+session+string+%28Generate+it+using+https%3A%2F%2Freplit.com%2F%40culturecloud%2Ftg-session-string-generator%29&BOT_TOKENDesc=Bot+API+token+of+the+bot+to+use+with+Userge+like+an+assistant+%28Get+it+from+%40BotFather+on+Telegram%29&OWNER_IDDesc=User+ID+of+the+account+you+want+as+the+owner+of+the+assistant+bot.+%28You+can+use+%40getidsbot+on+Telegram%29&LOG_CHANNEL_IDDesc=ID+of+the+channel+you+want+to+use+as+the+log+channel+for+Userge+%28Send+a+test+message+to+the+channel+and+forward+that+message+to+%40getidsbot+on+Telegram+to+get+the+channel+ID%29&DATABASE_URLDesc=MongoDB+URL+%28Get+it+from+https%3A%2F%2Fcloud.mongodb.com%29) 6 | 7 | ## Notes 8 | 9 | * Your GitHub account must be 30 days or older to deploy apps on Railway. 10 | * After deploying, every time you need to add new vars, **YOU MUST DELETE YOUR OLD DEPLOYMENT FIRST**. Or else, your Telegram user session will be revoked due to the duplication caused by the temporary parallel deployments of Railway and you need to regenerate the session string. 11 | --------------------------------------------------------------------------------