汪汪Bot是一个Telegram Bot,用于帮助你管理一台服务器上的Docker

Overview

WangWangBot

汪汪Bot是一个Telegram Bot,用于帮助你管理一台服务器上的Docker运行的Bot。这是使用视频:

bot_use

部署说明

安装运行

准备 local.env

普通版本

BOT_TOKEN=你的BOT_TOKEN
ADMINS=使用,分隔的管理员ID列表

如果你使用doppler,则是

DOPPLER_TOKEN=

创建并运行容器

docker run -d --name=wangwangbot --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:/data --env-file local.env hdcola/wangwangbot

这里的 pwd 目录默认是包含有 docker-compose.yml 及它会使用到的资源的目录(你也可以指定到别的目录去)。有关docker-compose相关信息,请参考 docker-compose文档

升级

停止、移除容器

docker stop wangwangbot
docker rm wangwangbot

更新image

docker pull hdcola/wangwangbot

之后再运行一遍创建并运行容易即可。

开发者调试

运行状态下使用交互模式进入容器

docker exec -it wangwangbot bash

非运行状态下使用交互模式启动一次性容器

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v `pwd`:/data hdcola/wangwangbot bash

测试doppler环境

docker run --rm -it --init \
   -e "DOPPLER_TOKEN=$(doppler configure get token --plain)" \
   -e "DOPPLER_PROJECT=$(doppler configure get project --plain)" \
   -e "DOPPLER_CONFIG=$(doppler configure get config --plain)" \
   hdcola/wangwangbot
You might also like...
A Telegram bot for remotely managing Binance Trade Bot
A Telegram bot for remotely managing Binance Trade Bot

Binance Trade Bot Manager Telegram A Telegram bot for remotely managing Binance Trade Bot. If you have feature requests please open an issue on this r

An Open-Source Discord bot created to provide basic functionality which should be in every discord guild. We use this same bot with additional configurations for our guilds.

A Discord bot completely written to be taken from the source and built according to your own custom needs. This bot supports some core features and is

This is telegram bot to generate string session for using user bots. You can see live bot in https://telegram.dog/string_session_Nsbot

TG String Session Generate Pyrogram String Session Using this bot. Demo Bot: Configs: API_HASH Get from Here. API_ID Get from Here. BOT_TOKEN Telegram

A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

A telegram bot which can show you the status of telegram bot

BotStatus-Ts-Bot An open source telegram Bot Status bot For demo you can check here The status is updated in every 1 hour About Bot This is a Bot stat

Benachrichtigungs-Bot für das niedersächische Impfportal / Notification bot for the lower saxony vaccination portal

Ein kleines Wochenend-Projekt von mir. Der Bot überwacht die REST-API des niedersächsischen Impfportals auf freie Impfslots und sendet eine Benachrichtigung mit deinem bevorzugtem Service. Ab da gilt leider: der Schnellste gewinnt. Bitte missbraucht den Bot nicht und verwendet moderate Intervalle.

Telegram Bot to Filter posts in Bot Inline search

Inline-Filter-Bot A Telegram Bot for filter in Inline Features Unlimited Filters Supports all type of filters Supports Alert Button Using Common Marku

Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

Comments
  • 使用docker运行bot出错

    使用docker运行bot出错

    使用的docker命令: docker run -d --name=wangwangbot --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /root/wangwangbot/data:/data --env-file local.env hdcola/wangwangbot

    /root/wangwangbot/local.env文件内容如下: BOT_TOKEN=我的bot token ADMINS=我的id

    对bot发送/admin发现没有反应,但是发送/start和/help有回应

    使用tail /root/wangwangbot/logs/wangwangbot.log 查到以下内容

    日志错误信息如下: compose.config.errors.ComposeFileNotFound: Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
    

    2021-08-22 01:10:56.357 | ERROR | aiogram.utils.executor:start_polling:323 - Task exception was never retrieved future: <Task finished name='Task-24' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py:409> exception=ComposeFileNotFound(['docker-compose.yml', 'docker-compose.yaml', 'compose.yml', 'compose.yaml'])> Traceback (most recent call last):

    File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 417, in _process_polling_updates for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)): │ │ │ │ │ │ └ True │ │ │ │ │ └ [<aiogram.types.update.Update object at 0x7f6922d849a0>] │ │ │ │ └ <function Dispatcher.process_updates at 0x7f692165d160> │ │ │ └ <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f6920e70c70> │ │ └ <method 'from_iterable' of 'itertools.chain' objects> │ └ <class 'itertools.chain'> └ <module 'itertools' (built-in)> File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 238, in process_updates return await asyncio.gather(*tasks) │ │ └ [<coroutine object Handler.notify at 0x7f691f8b5d40>] │ └ <function gather at 0x7f69232258b0> └ <module 'asyncio' from '/usr/local/lib/python3.9/asyncio/init.py'> File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 116, in notify response = await handler_obj.handler(*args, **partial_data) │ │ │ └ {} │ │ └ (<aiogram.types.update.Update object at 0x7f6922d849a0>,) │ └ <bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f6920e70c70>> └ Handler.HandlerObj(handler=<bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7... File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 259, in process_update return await self.message_handlers.notify(update.message) │ │ │ │ └ <aiogram.types.fields.Field object at 0x7f692177aac0> │ │ │ └ <aiogram.types.update.Update object at 0x7f6922d849a0> │ │ └ <function Handler.notify at 0x7f692169ea60> │ └ <aiogram.dispatcher.handler.Handler object at 0x7f6920e705e0> └ <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f6920e70c70> File "/usr/local/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 116, in notify response = await handler_obj.handler(*args, **partial_data) │ │ │ └ {} │ │ └ (<aiogram.types.message.Message object at 0x7f6922d84190>,) │ └ <function admin_command at 0x7f691f8cab80> └ Handler.HandlerObj(handler=<function admin_command at 0x7f691f8cab80>, spec=FullArgSpec(args=['message'], varargs=None, varkw...

    File "/WangWangBot/WangWangBot/handlers/users/admin.py", line 23, in admin_command msg, reply_markup = get_top_services_msg() └ <function get_top_services_msg at 0x7f6922de93a0>

    File "/WangWangBot/WangWangBot/handlers/users/admin.py", line 13, in get_top_services_msg services = docker.check_dir_service_list(Config.DOCKER_COMPOSE_DIR) │ │ │ └ '/data/' │ │ └ <class 'WangWangBot.config.Config'> │ └ <function check_dir_service_list at 0x7f691f8ca550> └ <module 'WangWangBot.utils.docker' from '/WangWangBot/WangWangBot/utils/docker.py'>

    File "/WangWangBot/WangWangBot/utils/docker.py", line 101, in check_dir_service_list project = get_project( └ <function get_project at 0x7f691f8c6ca0>

    File "/usr/local/lib/python3.9/site-packages/compose/cli/command.py", line 144, in get_project config_details = config.find(project_dir, config_path, environment, override_dir) │ │ │ │ │ └ None │ │ │ │ └ {'PATH': '/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'HOSTNAME': 'f7410364dcb6', 'BOT_TOKE... │ │ │ └ None │ │ └ '/data' │ └ <function find at 0x7f691ff6a4c0> └ <module 'compose.config' from '/usr/local/lib/python3.9/site-packages/compose/config/init.py'> File "/usr/local/lib/python3.9/site-packages/compose/config/config.py", line 320, in find raise ComposeFileNotFound(SUPPORTED_FILENAMES) │ └ ['docker-compose.yml', 'docker-compose.yaml', 'compose.yml', 'compose.yaml'] └ <class 'compose.config.errors.ComposeFileNotFound'>

    compose.config.errors.ComposeFileNotFound: Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

        Supported filenames: docker-compose.yml, docker-compose.yaml, compose.yml, compose.yaml
    

    Snipaste_2021-08-22_09-37-37

    help wanted 
    opened by TheEnd233 1
  • 如果服务器上的Docker没有启动会报错

    如果服务器上的Docker没有启动会报错

    File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 417, in _process_polling_updates for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)): │ │ │ │ │ │ └ True │ │ │ │ │ └ [<aiogram.types.update.Update object at 0x7f82a949adf0>] │ │ │ │ └ <function Dispatcher.process_updates at 0x7f82a839a5e0> │ │ │ └ <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f82a87ddee0> │ │ └ <method 'from_iterable' of 'itertools.chain' objects> │ └ <class 'itertools.chain'> └ <module 'itertools' (built-in)> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 238, in process_updates return await asyncio.gather(*tasks) │ │ └ [<coroutine object Handler.notify at 0x7f82a963c640>] │ └ <function gather at 0x7f82a6a11700> └ <module 'asyncio' from '/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/asyncio/init.py'> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 116, in notify response = await handler_obj.handler(*args, **partial_data) │ │ │ └ {} │ │ └ (<aiogram.types.update.Update object at 0x7f82a949adf0>,) │ └ <bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f82a87ddee0>> └ Handler.HandlerObj(handler=<bound method Dispatcher.process_update of <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7... File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/aiogram/dispatcher/dispatcher.py", line 259, in process_update return await self.message_handlers.notify(update.message) │ │ │ │ └ <aiogram.types.fields.Field object at 0x7f82a82bf340> │ │ │ └ <aiogram.types.update.Update object at 0x7f82a949adf0> │ │ └ <function Handler.notify at 0x7f82a836e160> │ └ <aiogram.dispatcher.handler.Handler object at 0x7f82a88094f0> └ <aiogram.dispatcher.dispatcher.Dispatcher object at 0x7f82a87ddee0> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/aiogram/dispatcher/handler.py", line 116, in notify response = await handler_obj.handler(*args, **partial_data) │ │ │ └ {} │ │ └ (<aiogram.types.message.Message object at 0x7f82a96588e0>,) │ └ <function admin_command at 0x7f82a96411f0> └ Handler.HandlerObj(handler=<function admin_command at 0x7f82a96411f0>, spec=FullArgSpec(args=['message'], varargs=None, varkw...

    File "/Users/hd/work/WangWangBot/WangWangBot/handlers/users/admin.py", line 25, in admin_command msg, reply_markup = get_top_services_msg() └ <function get_top_services_msg at 0x7f82a8b75550>

    File "/Users/hd/work/WangWangBot/WangWangBot/handlers/users/admin.py", line 14, in get_top_services_msg services = docker.check_dir_service_list(Config.DOCKER_COMPOSE_DIR) │ │ │ └ '/Users/hd/work/WangWangBot/' │ │ └ <class 'WangWangBot.config.Config'> │ └ <function check_dir_service_list at 0x7f82a963aa60> └ <module 'WangWangBot.utils.docker' from '/Users/hd/work/WangWangBot/WangWangBot/utils/docker.py'>

    File "/Users/hd/work/WangWangBot/WangWangBot/utils/docker.py", line 101, in check_dir_service_list project = get_project( └ <function get_project at 0x7f82a963a1f0>

    File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/compose/cli/command.py", line 152, in get_project client = get_client( └ <function get_client at 0x7f82a9634ca0> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/compose/cli/docker_client.py", line 41, in get_client client = docker_client( └ <function docker_client at 0x7f82a9634e50> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/compose/cli/docker_client.py", line 170, in docker_client client = APIClient(use_ssh_client=not use_paramiko_ssh, **kwargs) │ │ └ {'base_url': 'unix:///var/run/docker.sock', 'timeout': 60, 'user_agent': 'docker-compose/1.29.2 docker-py/5.0.0 Darwin/20.6.0'} │ └ 0 └ <class 'docker.api.client.APIClient'> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/docker/api/client.py", line 197, in init self._version = self._retrieve_server_version() │ │ └ <function APIClient._retrieve_server_version at 0x7f82a9298940> │ └ <docker.api.client.APIClient object at 0x7f82a9658b80> └ <docker.api.client.APIClient object at 0x7f82a9658b80> File "/usr/local/Caskroom/miniconda/base/envs/aio/lib/python3.9/site-packages/docker/api/client.py", line 221, in _retrieve_server_version raise DockerException( └ <class 'docker.errors.DockerException'>

    docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

    bug 
    opened by hdcola 0
Releases(1.0.2)
Owner
老房东的代码练习册
老房东的代码练习册
A ShareX alternative for Mac OS built in Python.

Clipboard Uploader A ShareX alternative for Mac OS built in Python. Install and setup Download the latest release and put it in your applications fold

Ben Tettmar 2 Jun 07, 2022
This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu

Remaded Discum Its not Official Discum Wrapper ! This Wrapper is a Discum Copy With Addons, original one is made by Merubokkusu Authors @merubokkusu (

discum-remaded 8 Aug 09, 2022
A simple python script to send files into your telegram Bot form your PC, Server etc.

telegramSend A simple python script to send files into your telegram Bot form your PC, Server etc. How to Use Install requirements.txt pip3 install -r

Ajay Kumar Tekam 1 Jul 19, 2022
Tesseract Open Source OCR Engine (main repository)

Tesseract OCR About This package contains an OCR engine - libtesseract and a command line program - tesseract. Tesseract 4 adds a new neural net (LSTM

48.3k Jan 05, 2023
ZenML 🙏: MLOps framework to create reproducible ML pipelines for production machine learning.

ZenML is an extensible, open-source MLOps framework to create production-ready machine learning pipelines. It has a simple, flexible syntax, is cloud and tool agnostic, and has interfaces/abstraction

ZenML 2.6k Dec 27, 2022
Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot

A101AktuelRobot Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot @A101AktuelRobot 💸 Bağış Yap ☕️ Kahve Ismarla 🌐 Telif Hakkı ve Lisans Copy

Ömer Faruk Sancak 10 Nov 02, 2022
Python client library for Google Maps API Web Services

Python Client for Google Maps Services Description Use Python? Want to geocode something? Looking for directions? Maybe matrices of directions? This l

Google Maps 3.8k Jan 01, 2023
Async client API for the Telegram Group Calls

PyTgCalls This project allow to make Telegram group call with MTProto Api using Pyrogram and WebRTC, this is possible thanks to the power of NodeJS's

185 Jan 03, 2023
GitHub Activity Generator - A script that helps you instantly generate a beautiful GitHub Contributions Graph for the last year.

GitHub Activity Generator A script that helps you instantly generate a beautiful GitHub Contributions Graph for the last year. Before 😐 😶 😒 After ?

1 Dec 30, 2021
A python bot that scrapes free udemy coupons and sends them to Telegram.

About: A python telegram bot that scrapes information about fresh free Udemy coupons content from couponscorpion.com and sends it to teleram channel h

Irina Gayday 1 Dec 19, 2021
数字货币BTC量化交易系统-实盘行情服务器,虚拟币自动炒币-火币API-币安交易所-量化交易-网格策略。趋势跟踪策略,最简源码,可在线回测,一键部署,可定制的比特币量化交易框架,3年实盘检验!

huobi_intf 提供火币网的实时行情服务器(支持火币网所有交易对的实时行情),自带API缓存,可用于实盘交易和模拟回测。 行情数据,是一切量化交易的基础,可以获取1min、60min、4hour、1day等数据。数据能进行缓存,可以在多个币种,多个时间段查询的时候,查询速度依然很快。 服务框架

dev 258 Sep 20, 2021
A wrapper for aqquiring Choice Coin directly through a Python Terminal. Leverages the TinyMan Python-SDK.

CHOICE_TinyMan_Wrapper A wrapper that allows users to acquire Choice Coin directly through their Terminal using ALGO and various Algorand Standard Ass

Choice Coin 16 Sep 24, 2022
Start multiple bots using one script. VK RAID BOTNET

MultiRaidBotnet Start multiple bots using one script. VK RAID BOTNET Русский launcher.py - главный скрипт, запускающий весь ботнет config.py - в нём х

2 Jul 22, 2022
Python library to download market data via Bloomberg, Eikon, Quandl, Yahoo etc.

findatapy findatapy creates an easy to use Python API to download market data from many sources including Quandl, Bloomberg, Yahoo, Google etc. using

Cuemacro 1.3k Jan 04, 2023
GitGram Bot. Bot Then Message You Your Repo Starts, Forks, And Many More

Yet Another GitAlertBot Inspired From Dev-v2's GitGram Run Bot: Local Host Git Clone Repo : For Telethon Version : git clone https://github.com/TeamAl

Alina RoBot 2 Nov 24, 2021
An API or getting Optifine VersionsList/Version/Download-URL.

Optifine-API An API for getting Optifine VersionsList/Versions/Download-URL. Table of contents Get Versions List Get Specify Versions Download Optifin

2 Dec 04, 2022
Retrieve information from DBLP and update BibTex files automatically

Rebib TLDR: This script retrieves information from DBLP to update your BibTex files. python rebib.py --bibfile xxx.bib It first parses the bib entries

Shangtong Zhang 49 Jan 01, 2023
A Discord bot to play bluffing games like Dobbins or Bobbins

Usage: pip install -r requirements.txt python3 bot.py DISCORD_BOT_TOKEN Gameplay: All commands are case-insensitive, with trailing punctuation and spa

4 May 27, 2022
Apps related to Odoo it's calendar features

calendar Apps related to Odoo it's calendar/appointments features: online_appointment_locations: allow setting an online URL per employee online_appoi

Yenthe Van Ginneken 3 Oct 27, 2022