Skip to content
This repository was archived by the owner on Oct 16, 2023. It is now read-only.

Commit 050bcef

Browse files
Tejas61900Tejas61900
and
Tejas61900
authored
hoe (#71)
Co-authored-by: Tejas61900 <[email protected]>
1 parent 1aa5f0b commit 050bcef

9 files changed

+69
-23
lines changed

Aptfile

-7
This file was deleted.

Dockerfile

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
FROM ubuntu:latest
1+
FROM python:3.9.5-buster
22

3-
WORKDIR /usr/src/app
4-
RUN chmod 777 /usr/src/app
5-
RUN apt-get -qq update
6-
RUN DEBIAN_FRONTEND="noninteractive" apt-get -qq install python3 python3-pip software-properties-common
3+
WORKDIR /wbb
4+
RUN chmod 777 /wbb
5+
RUN apt-get update -y
6+
RUN apt-get install -y wget curl bash git neofetch sudo software-properties-common ffmpeg
77

88
#Updating Libraries
99
RUN pip3 install -U pip
1010
COPY requirements.txt .
1111
RUN pip3 install --no-cache-dir -U -r requirements.txt
1212

13+
# If u want to use /update feature, uncomment the following and edit
14+
#RUN git config --global user.email "your_email"
15+
#RUN git config --global user.name "git_username"
16+
1317
#Copying All Source
1418
COPY . .
1519

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,24 @@ $ python3 str_gen.py
6464
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/thehamkercat/WilliamButcherBot/)
6565

6666

67+
## Docker
68+
69+
```sh
70+
$ git clone https://github.com/TheHamkerCat/WilliamButcherBot && cd WilliamButcherBot
71+
72+
$ cp sample_config.env config.env
73+
```
74+
Edit **config.env** with your own values
75+
76+
# Build & Run
77+
78+
```sh
79+
$ sudo docker build . -t wbb
80+
81+
$ sudo docker run wbb
82+
```
83+
To stop use `CTRL+C`
84+
6785
## Note
6886

6987
1. Support Chat: https://t.me/wbbsupport

app.json

+1-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,7 @@
1111
"telegram-bot",
1212
"pyrogram"
1313
],
14-
"stack": "heroku-20",
15-
"buildpacks": [
16-
{
17-
"url": "heroku/python"
18-
},
19-
{
20-
"url": "heroku-community/apt"
21-
}
22-
],
14+
"stack": "container",
2315
"env": {
2416
"BOT_TOKEN": {
2517
"description": "Obtain a Telegram bot token by contacting @BotFather",

heroku.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
build:
2+
docker:
3+
worker: Dockerfile

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ uvloop
2121
youtube_dl
2222
bs4
2323
wget
24+
python-dotenv

runtime.txt

-1
This file was deleted.

sample_config.env

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Only for Docker Deployment
2+
3+
BOT_TOKEN=your_bot_token # Get it from @botfather
4+
5+
API_ID=your_api_id
6+
7+
API_HASH=your_api_hash
8+
9+
SESSION_STRING=your_session # Check Readme to generate sessions
10+
11+
USERBOT_PREFIX=userbot_prefix
12+
13+
SUDO_USERS_ID=682966383 # Sudo users have full access to everythin, don't trust anyone
14+
15+
LOG_GROUP_ID=-125639839
16+
17+
GBAN_LOG_GROUP_ID=-173738999
18+
19+
MESSAGE_DUMP_CHAT=-173738999
20+
21+
FERNET_ENCRYPTION_KEY=iKMq0WZMnJKjMQxZWKtv-cplMuF_LoyshXj0XbTGGWM= # Leave it
22+
23+
WELCOME_DELAY_KICK_SEC=300 # Edit if u want
24+
25+
MONGO_DB_URI=your_mongodb_uri
26+
27+
ARQ_API_URL=http://thearq.tech # Leave it
28+
29+
ARQ_API_KEY=your_api_key # Get it from @ARQRobot
30+
31+
LOG_MENTIONS=True # Make It False If You Don't Want It
32+
33+
SPAM_CHECK_EXCEPTION_GROUPS=-16628896 # Group where spam protection will be ignored , Seperated by space

sample_config.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
HEROKU = True # NOTE Make it false if you're not deploying on heroku.
1+
from dotenv import load_dotenv
2+
load_dotenv('config.env')
3+
4+
HEROKU = True # NOTE Make it false if you're not deploying on heroku or docker.
25

36
if HEROKU:
47
from os import environ

0 commit comments

Comments
 (0)