Qbit ready for vps check readme

Signed-off-by: anas <e.anastayyar@gmail.com>
This commit is contained in:
anas 2021-08-29 06:46:05 +03:00
parent e058baaca5
commit c49100594c
5 changed files with 61 additions and 10 deletions

View File

@ -199,6 +199,8 @@ python3 generate_drive_token.py
## Deploying ## Deploying
**IMPORTANT NOTE**: In start.sh you must replace $PORT with 80 or any other port you want to use
- Start Docker daemon (skip if already running): - Start Docker daemon (skip if already running):
``` ```
sudo dockerd sudo dockerd
@ -209,8 +211,45 @@ sudo docker build . -t mirror-bot
``` ```
- Run the image: - Run the image:
``` ```
sudo docker run mirrorbot sudo docker run -p 80:80 mirrorbot
``` ```
OR
**NOTE**: If you want to use port other than 80, so change it in docker-compose.yml
- Using Docker-compose so you can edit and build your image in seconds:
```
sudo apt install docker-compose
```
- Build and run Docker image:
```
sudo docker-compose up
```
- After edit files with nano for example (nano start.sh):
```
sudo docker-compose build
sudo docker-compose up
```
or
```
sudo docker-compose up --build
```
- To stop docker run
```
sudo docker ps
```
```
sudo docker stop id
```
- To clear the container (this will not effect on image):
```
sudo docker container prune
```
- To delete the image:
```
sudo docker image prune -a
```
## [Video From Tortoolkit Repo](https://youtu.be/c8_TU1sPK08)
## Deploying on Heroku ## Deploying on Heroku
- Deploying on Heroku with Github Workflow - Deploying on Heroku with Github Workflow

View File

@ -43,9 +43,9 @@ load_dotenv('config.env')
alive = subprocess.Popen(["python3", "alive.py"]) alive = subprocess.Popen(["python3", "alive.py"])
subprocess.run(["mkdir", "-p", ".config/qBittorrent"]) subprocess.run(["mkdir", "-p", "qBittorrent/config"])
subprocess.run(["cp", "qBittorrent.conf", ".config/qBittorrent/qBittorrent.conf"]) subprocess.run(["cp", "qBittorrent.conf", "qBittorrent/config/qBittorrent.conf"])
subprocess.run(["qbittorrent-nox", "-d"]) subprocess.run(["qbittorrent-nox", "-d", "--profile=."])
Interval = [] Interval = []

View File

@ -18,7 +18,7 @@ SUDO_USERS = "" # Split by space
IGNORE_PENDING_REQUESTS = "" IGNORE_PENDING_REQUESTS = ""
USE_SERVICE_ACCOUNTS = "" USE_SERVICE_ACCOUNTS = ""
INDEX_URL = "" INDEX_URL = ""
STATUS_LIMIT = "" # Recommend limit status to 4 tasks max STATUS_LIMIT = "" # Recommend limit status to 4 tasks
UPTOBOX_TOKEN = "" UPTOBOX_TOKEN = ""
MEGA_API_KEY = "" MEGA_API_KEY = ""
MEGA_EMAIL_ID = "" MEGA_EMAIL_ID = ""
@ -30,8 +30,8 @@ SHORTENER = ""
SHORTENER_API = "" SHORTENER_API = ""
# qBittorrent # qBittorrent
IS_VPS = "" # Don't set this to True even if VPS, unless facing error with web server IS_VPS = "" # Don't set this to True even if VPS, unless facing error with web server
SERVER_PORT = "80" # Only for VPS SERVER_PORT = "80" # Only if IS_VPS is True
BASE_URL_OF_BOT = "" # Required for Heroku BASE_URL_OF_BOT = "" # Web Link, Required for Heroku to avoid sleep or use worker if u don't want to use web(selection)
# If you want to use Credentials externally from Index Links, fill these vars with the direct links # If you want to use Credentials externally from Index Links, fill these vars with the direct links
# These are optional, if you don't know, simply leave them, don't fill anything in them. # These are optional, if you don't know, simply leave them, don't fill anything in them.
ACCOUNTS_ZIP_URL = "" ACCOUNTS_ZIP_URL = ""
@ -46,7 +46,7 @@ HEROKU_API_KEY = ""
HEROKU_APP_NAME = "" HEROKU_APP_NAME = ""
# View Link button to open file Index Link in browser instead of direct download link # View Link button to open file Index Link in browser instead of direct download link
# You can figure out if it's compatible with your Index code or not, open any video from you Index and check if the END of link from browser link bar is ?a=view, if yes make it "True" it will work (Compatible with Bhadoo Index Code) # You can figure out if it's compatible with your Index code or not, open any video from you Index and check if the END of link from browser link bar is ?a=view, if yes make it "True" it will work (Compatible with Bhadoo Index Code)
VIEW_LINK = "False" VIEW_LINK = ""
# Add more buttons (Three buttons are already added of Drive Link, Index Link, and View Link, you can add extra buttons too, these are optional) # Add more buttons (Three buttons are already added of Drive Link, Index Link, and View Link, you can add extra buttons too, these are optional)
# If you don't know what are below entries, simply leave them, Don't fill anything in them. # If you don't know what are below entries, simply leave them, Don't fill anything in them.
BUTTON_FOUR_NAME = "" BUTTON_FOUR_NAME = ""

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: "3.3"
services:
slam:
build: .
command: bash start.sh
restart: on-failure
ports:
- "80:80"

View File

@ -24,7 +24,7 @@ Advanced\RecheckOnCompletion=true
Advanced\LtTrackerExchange=true Advanced\LtTrackerExchange=true
Advanced\SuperSeeding=false Advanced\SuperSeeding=false
Bittorrent\MaxConnecs=3000 Bittorrent\MaxConnecs=3000
Bittorrent\MaxConnecsPerTorrent=300 Bittorrent\MaxConnecsPerTorrent=500
Bittorrent\DHT=true Bittorrent\DHT=true
Bittorrent\DHTPort=6881 Bittorrent\DHTPort=6881
Bittorrent\Encryption=0 Bittorrent\Encryption=0
@ -32,12 +32,13 @@ Bittorrent\PeX=true
Bittorrent\LSD=true Bittorrent\LSD=true
Bittorrent\sameDHTPortAsBT=true Bittorrent\sameDHTPortAsBT=true
Bittorrent\uTP=true Bittorrent\uTP=true
Bittorrent\uTP_rate_limited=false Bittorrent\uTP_rate_limited=true
Connection\PortRangeMin=6881 Connection\PortRangeMin=6881
Connection\UPnP=true Connection\UPnP=true
Downloads\DiskWriteCacheSize=64 Downloads\DiskWriteCacheSize=64
Downloads\PreAllocation=true Downloads\PreAllocation=true
Downloads\UseIncompleteExtension=true Downloads\UseIncompleteExtension=true
General\PreventFromSuspendWhenDownloading=true
Queueing\IgnoreSlowTorrents=true Queueing\IgnoreSlowTorrents=true
Queueing\MaxActiveDownloads=50 Queueing\MaxActiveDownloads=50
Queueing\MaxActiveTorrents=100 Queueing\MaxActiveTorrents=100