Telegram bot for coordinating flight-time package splits ("распил"). Users create requests through a Telegram mini-app; the bot automatically matches groups whose combined hours total 10 and notifies the group chat.
- Create a bot via @BotFather and obtain the token.
- Configure a Web App for the bot in BotFather (use
/newappor the menu button setting) and point it to the public URL where the mini-app will be served. - Copy
.env.exampleto.envand fill in the values. - Run with Docker Compose:
docker compose up -d --buildOr via Make:
make upThe bot container runs both the Telegram bot (polling or webhook) and a lightweight HTTP server for the mini-app on WEBAPP_PORT (default 8080). Put a reverse proxy (nginx / Caddy) in front to terminate TLS.
Use the included Makefile to build and push tags to Docker Hub with separate commands:
make release-latest
make release-stableThe Docker image build now includes the React mini-app build (TelegramUI) automatically.
You can also run steps separately:
make build-latest
make push-latest
make build-stable
make push-stableTo override the repository name:
make release-latest IMAGE=your-dockerhub-user/ifly-time-bot
make release-stable IMAGE=your-dockerhub-user/ifly-time-botmake up # docker compose up -d --build
make logs # follow bot logs
make down # stop and remove containers
make build-frontend
make frontend-devbuild-frontend and frontend-dev use bun when available, otherwise npm.
| Variable | Required | Description |
|---|---|---|
TELEGRAM_TOKEN |
yes | Bot token from BotFather |
ALLOWED_GROUP_ID |
yes | Telegram group chat ID |
DATABASE_URL |
yes | PostgreSQL connection string |
MINIAPP_URL |
yes | t.me deep link to the mini-app (used in dashboard button) |
WEBAPP_PORT |
no | Internal HTTP port for the mini-app (default 8080) |
CONNECTION_MODE |
no | polling (default) or webhook |
WEBHOOK_URL |
no | Public URL for webhook mode |
PORT |
no | Webhook listen port (default 8443) |
THREAD_ID |
no | Forum topic ID (default 1) |
TIMEZONE |
no | IANA timezone (default Europe/Minsk) |
LOG_LEVEL |
no | Python log level (default INFO) |
/cancel– remove your pending request/check_matches– manually trigger the matching job/start– show help
Requests are created and edited through the mini-app button on the dashboard message in the group.