Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #149

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
HEROKU_EMAIL:
description: "Heroku email address"
required: true
HK_TEAM_NAME:
HEROKU_TEAM_NAME:
description: "Heroku Team Name"
required: false
BOT_TOKEN:
Expand All @@ -30,22 +30,41 @@ on:
TELEGRAM_HASH:
description: "Telegram HASH from https://my.telegram.org/"
required: true

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

- name: Delete unnecessary directories and files
run: |
# Directories to delete
for dir in bot qBittorrent web; do
if [ -d "./$dir" ]; then
echo "Deleting directory: $dir"
rm -rf ./$dir
else
echo "Directory not found: $dir"
fi
done

# Delete a2c.conf if it exists
if [ -f "./a2c.conf" ]; then
echo "Deleting file: a2c.conf"
rm -f ./a2c.conf
else
echo "File not found: a2c.conf"
fi

- name: Deploy to Heroku
uses: 5hojib/heroku-deploy-action@v1.0.1
uses: 5hojib/heroku-deploy-action@v2
with:
heroku_api_key: ${{inputs.HEROKU_API_KEY}}
heroku_app_name: ${{inputs.HEROKU_APP_NAME}}
heroku_email: ${{inputs.HEROKU_EMAIL}}
team: ${{ inputs.HK_TEAM_NAME != '' && format('team={0}', inputs.HK_TEAM_NAME) || '' }}
team: ${{ inputs.HEROKU_TEAM_NAME != '' && format('team={0}', inputs.HEROKU_TEAM_NAME) || '' }}
usedocker: true
docker_heroku_process_type: web
stack: "container"
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM 5hojib/aeon:latest

WORKDIR /usr/src/app
RUN chmod 777 /usr/src/app

COPY requirements.txt .
RUN pip3 install --break-system-packages --ignore-installed --no-cache-dir -r requirements.txt

COPY . .
CMD ["bash", "start.sh"]
84 changes: 49 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,59 +1,73 @@
***
![](https://github.com/5hojib/5hojib/raw/main/images/Aeon-MLTB.gif)
***

---

# Aeon Bot

Aeon is a streamlined and feature-rich bot designed for efficient deployment and enhanced functionality.

---

## Features

- **Streamlined Code**: Unnecessary features and code have been removed for a more efficient and minimalistic bot.
- **Heroku Deployment**: Fully configured for easy deployment on Heroku.
- **Enhanced Functionality**: Includes additional features from various sources, improving the bot's overall capabilities.
- **Minimalistic and Optimized**: Simplified by removing unnecessary code for better performance.
- **Effortless Deployment**: Fully configured for quick and easy deployment to Heroku.
- **Enhanced Capabilities**: Integrates features from multiple sources to provide a versatile bot experience.

---

## Deployment Instructions (Heroku)

Follow these steps to deploy Aeon to Heroku:

## Heroku Deployment Instructions
### 1. Fork and Star the Repository
- Click the **Fork** button at the top-right corner of this repository.
- Give the repository a star to show your support.

1. **Fork and Star the Repository**
- Start by forking and starring this repository.
- When forking, ensure that the option "Copy the default branch only" is unchecked before forking the repository.
### 2. Navigate to Your Forked Repository
- Access your forked version of this repository.

2. **Navigate to Your Forked Repository**
- Once the repository is forked, navigate to your forked repository.
### 3. Enable GitHub Actions
- Go to the **Settings** tab of your forked repository.
- Enable **Actions** by selecting the appropriate option in the settings.

3. **Access the Settings**
- Go to the settings of your forked repository.
- Enable all actions in the settings.
### 4. Run the Deployment Workflow
1. Open the **Actions** tab.
2. Select the `Deploy to Heroku` workflow from the available list.
3. Click **Run workflow** and fill out the required inputs:
- **BOT_TOKEN**: Your Telegram bot token.
- **OWNER_ID**: Your Telegram ID.
- **DATABASE_URL**: MongoDB connection string.
- **TELEGRAM_API**: Telegram API ID (from [my.telegram.org](https://my.telegram.org/)).
- **TELEGRAM_HASH**: Telegram API hash (from [my.telegram.org](https://my.telegram.org/)).
- **HEROKU_APP_NAME**: Name of your Heroku app.
- **HEROKU_EMAIL**: Email address associated with your Heroku account.
- **HEROKU_API_KEY**: API key from your Heroku account.
- **HEROKU_TEAM_NAME** (Optional): Required only if deploying under a Heroku team account.

4. **Run Action Workflow**
- Go to the **Actions** tab.
- Select the `Deploy to Heroku` action from the list of workflows.
- Click on **Run workflow**.
- Fill in the following variables in the form:
- `BOT_TOKEN`
- `OWNER_ID`
- `DATABASE_URL`
- `TELEGRAM_API`
- `TELEGRAM_HASH`
- `HEROKU_APP_NAME`
- `HEROKU_EMAIL`
- `HEROKU_API_KEY`
- Run the action workflow.
4. Run the workflow and wait for it to complete.

5. **Finalize the Deployment**
- After the deployment is complete, finalize the remaining variables.
- Upload sensitive files like `token.pickle` using the `/botsettings` command.
### 5. Finalize Setup
- After deployment, configure any remaining variables in your Heroku dashboard.
- Use the `/botsettings` command to upload sensitive files like `token.pickle` if needed.

---

## Contributing

Feel free to submit pull requests and open issues for any bugs or feature requests. Contributions are always welcome!
We welcome contributions! Whether it's bug fixes, feature enhancements, or general improvements:
- **Report issues**: Open an issue for bugs or suggestions.
- **Submit pull requests**: Share your contributions with the community.

---

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
This project is licensed under the MIT License. Refer to the [LICENSE](LICENSE) file for details.

---

## Acknowledgements

- Thanks to the original developers of the Mirror-Leech-Telegram-Bot.
- Contributions and feature integrations from various repositories.
- Special thanks to the original developers of the [Mirror-Leech-Telegram-Bot](https://github.com/anasty17/mirror-leech-telegram-bot).
- Gratitude to contributors from various repositories whose features have been integrated into Aeon.
43 changes: 43 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
aiohttp
aiofiles
aioshutil
anytree==2.8.0
apscheduler
aria2p
asyncio
beautifulsoup4
bencoding
cinemagoer
cloudscraper
dnspython
electrogram
feedparser
flask
gevent
google-api-python-client
google-auth-httplib2
google-auth-oauthlib
gunicorn
httpx
langcodes
lxml
motor
mutagen
markdown
natsort
pillow
psutil
pybase64
pycountry
python-dotenv
pyshorteners
python-magic
qbittorrent-api
requests
speedtest-cli
telegraph
tenacity
uv
uvloop
xattr
yt-dlp[default]
7 changes: 7 additions & 0 deletions sample_config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
OWNER_ID = ""
TELEGRAM_API = ""
TELEGRAM_HASH = ""
DATABASE_URL = ""

UPSTREAM_REPO = "https://github.com/5hojib/Aeon"
UPSTREAM_BRANCH = "main"
Loading