Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Sep 25, 2023
0 parents commit 24a3f79
Show file tree
Hide file tree
Showing 91 changed files with 14,810 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/donations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
### Donations

Binance pay id
```
540658045
```
BSC address
```
0x1ad20373c1300f95bab1d4603e20c98da9244138
```
TRC20 address
```
TNvykph6jD6EXhi6TBqpW9ogXAkJFu3kfC
```
36 changes: 36 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy to Heroku

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to deploy'
required: true
default: 'deploy'

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout deploy branch
uses: actions/checkout@v2
with:
ref: 'refs/heads/deploy'

- name: Deploy to Heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
usedocker: true
docker_heroku_process_type: web
stack: "container"
region: "eu"
env:
HD_OWNER_ID: ${{secrets.OWNER_ID}}
HD_TELEGRAM_API: ${{secrets.TELEGRAM_API}}
HD_TELEGRAM_HASH: ${{secrets.TELEGRAM_HASH}}
HD_DATABASE_URL: ${{secrets.DATABASE_URL}}
HD_BOT_TOKEN: ${{secrets.BOT_TOKEN}}
HD_CONFIG_FILE_URL: ${{secrets.CONFIG_FILE_URL}}
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
config.env
*.pyc
data*
.vscode
.idea
*.json
*.pickle
.netrc
log.txt
accounts/*
MediaInfo/*
Images/*
Thumbnails/*
tanha/*
list_drives.txt
cookies.txt
downloads
bot.session
user.session
terabox.txt
rcl.conf
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
### Heroku Setup Instructions:

1. Start by forking and starring this repository.
2. Navigate to your forked repository.
3. Access the settings.
4. Set the deploy branch as the default branch.
5. Remove all other branches.
6. Populate these secret variables in GitHub:

* `BOT_TOKEN`
* `OWNER_ID`
* `DATABASE_URL`
* `TELEGRAM_API`
* `TELEGRAM_HASH`
* `HEROKU_APP_NAME`
* `HEROKU_EMAIL`
* `HEROKU_API_KEY`

7. Run action workflow.
8. After the deployment is complete, finalize the remaining variables and upload sensitive files like `token.pickle` using the `bsetting` command.

[Donate](.github/donations.md)
34 changes: 34 additions & 0 deletions a2c.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
allow-overwrite=true
auto-file-renaming=true
bt-enable-lpd=true
bt-detach-seed-only=true
bt-force-encryption=true
bt-remove-unselected-file=true
bt-max-peers=0
check-certificate=false
check-integrity=true
continue=true
content-disposition-default-utf8=true
disk-cache=40M
daemon=true
enable-rpc=true
follow-torrent=mem
force-save=true
http-accept-gzip=true
max-concurrent-downloads=10
max-connection-per-server=10
max-file-not-found=0
max-tries=20
min-split-size=10M
max-upload-limit=1K
netrc-path=/usr/src/app/.netrc
optimize-concurrent-downloads=false
peer-agent=qBittorrent/4.5.4
peer-id-prefix=-qB4540-
quiet=true
rpc-max-request-size=1024M
reuse-uri=true
seed-ratio=0
split=10
summary-interval=0
user-agent=Wget/1.12
22 changes: 22 additions & 0 deletions alive.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
import time
import logging
import requests

BASE_URL = os.environ.get('BASE_URL', None)
try:
if len(BASE_URL) == 0:
raise TypeError
BASE_URL = BASE_URL.rstrip("/")
except TypeError:
BASE_URL = None
PORT = os.environ.get('PORT', None)
if PORT is not None and BASE_URL is not None:
while True:
try:
requests.get(BASE_URL).status_code
time.sleep(400)
except Exception as e:
logging.error(f"alive.py: {e}")
time.sleep(2)
continue
Loading

0 comments on commit 24a3f79

Please sign in to comment.