Coder Social home page Coder Social logo

nessshon / bounty-bridge-bot Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 0.0 2.07 MB

The bot monitors repository for new challenges, automatically informing developer chats about new rewards.

Home Page: https://t.me/bountybridgebot

License: MIT License

Dockerfile 0.12% Python 78.16% CSS 0.28% JavaScript 16.59% HTML 4.85%
telegram-bot ton ton-society

bounty-bridge-bot's Introduction

๐Ÿค– Bounty Bridge Bot

TON Telegram Bot Python Versions License

image

Starlette FastAPI Telegram PHPMyAdmin MySQL Redis Certbot Nginx Docker

The bot monitors repository for new challenges, automatically informing developer chats about new rewards. It solicits opinions and participation, display relevant tags and include an interactive button for easy reward creation.

Features

Project Components:

  • MySQL - Database management system.
  • Nginx - Proxy server for routing and handling web requests.
  • Certbot - SSL certificate management and issuance.
  • phpMyAdmin - Web-based database administration tool.
  • Admin Panel - Custom web interface for administrative tasks.
  • Telegram Bot - Bot implementation for interacting on Telegram.
  • Redis - In-memory data structure store.

Launch and deployment:

Preparation

Clone this repo:

git clone https://github.com/nessshon/bounty-bridge-bot.git

Go to the project folder:

cd bounty-bridge-bot

Clone environment variables file:

cp .env.example .env

Configure environment variables variables file:

nano .env
Local launch

Install dependencies

pip install -r requirements.txt

Launch project:

python -m project
Deployment and launch

Change server_name on phpmyadmin.conf:

server_name pma.your-domain.com www.pma.your-domain.com;

Change server_name on project.conf :

server_name app.your-domain.com www.app.your-domain.com;

Install Docker and docker-compose:

apt install docker.io docker-compose -y

Deploy the project:

docker-compose up --build
  • The deployment script handles the creation of containers for MySQL and Redis.
  • Configures MySQL and Redis databases.
  • Configures Nginx as a proxy server for web requests.
  • Uses Certbot to generate and renew SSL certificates for secure communications.
  • Launches the admin panel, Telegram Bot and phpMyAdmin.

Before deploying the project, be sure to configure the virtual environment configurations.
Additional configuration parameters are located in .env.example.

Environment Variables Reference

Here is a reference guide for the environment variables used in the project:

Expand to view
Variable Type Description Example Local Example Prod
BOT_TOKEN str Bot token, obtained from @BotFather 123456:qweRTY 123456:qweRTY
BOT_USERNAME str The username of the bot same_bot same_bot
BOT_DEV_ID int User ID of the bot developer 123456789 123456789
BOT_ADMIN_ID int User ID of the bot administrator 123456789 123456789
GITHUB_TOKEN str GitHub token (you can obtain this from your GitHub account) ghp_BWC...ZzD ghp_BWC...ZzD
GITHUB_OWNER str GitHub owner (organization or user) where the repository is located ton-society ton-society
GITHUB_REPO str GitHub repository name grants-and-bounties grants-and-bounties
TONAPI_KEY str API key from tonconsole AE33EX..ASD32 AE33EX..ASD32
APP_URL str The domain of the webhook https://...ngrok.free.app https://example.com
APP_HOST str The host address where the app is running localhost 0.0.0.0
APP_PORT int The port number on which the app is listening 8000 8000
WEBHOOK_SECRET str Secret key for securing the webhook qwerty12345 qwerty12345
WEBHOOK_PATH str The path of the webhook /bot /bot
REDIS_HOST str The hostname or IP address of the Redis server localhost redis
REDIS_PORT int The port number on which the Redis server is running 6379 6379
REDIS_DB int The Redis database number 0 0
MYSQL_ROOT_PASSWORD str Root password for MySQL --skip-- root-password
MYSQL_HOST str The hostname or IP address of the database server localhost localhost
MYSQL_PORT int The port number on which the database server is running 3306 3306
MYSQL_USER str The username for accessing the database user user
MYSQL_PASSWORD str The password for accessing the database password password
MYSQL_DATABASE str The name of the database dbname dbname
CERTBOT_EMAIL str Email address for Certbot notifications --skip-- [email protected]

Contribution

We welcome your contributions! If you have ideas for improvement or have identified a bug, please create an issue or submit a pull request.

Support

Supported by TON Society, Grants and Bounties program.

License

This repository is distributed under the MIT License.

bounty-bridge-bot's People

Contributors

nessshon avatar

Stargazers

 avatar  avatar  avatar Roman Inozemtsev avatar

Watchers

Kostas Georgiou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.