This repository contains file for quick deployment of Octo-Tg-Bot
-
Make config file and write your stuff in it
cp settings.base.toml settings.toml nano settings.toml
-
Make preimport file
cp preimport-example.py preimport.py
-
(Optional) Customize preimport file
nano preimport.py
-
Run the bot
docker-compose up
-
The bot should send you message with results from booting up if you set everything up correctly.
You can add that stuff by creating docker-compose.override.yml and putting that stuff into it
watchtower:
command: --http-api-update --debug --scope octobot
ports:
- 8080:8080
environment:
WATCHTOWER_HTTP_API_TOKEN: "PUT SUPER SECURE TOKEN HERE!"
Make sure to set following secrets if you use the same deployment GitHub action:
- WT_URL - url to update. For example: http://server:8080/v1/update
- WT_TOKEN - your super secure token
watchtower:
environment:
WATCHTOWER_NOTIFICATIONS: shoutrrr
WATCHTOWER_NOTIFICATION_URL: "telegram://bot_token@telegram?channels=user_id"
⚠️ If you are using the watchtower Telegram notifications, use different token in WATCHTOWER_NOTIFICATION_URL. Bot API blocks out access to bot API after the the different endpoint is getting used, so Watchtower will fail when trying to send notifications
version: "3.8"
services:
botapi:
image: ghcr.io/octo-tg-bot/tgbotapi:latest
environment:
TELEGRAM_API_ID: PUT THE API ID HERE
TELEGRAM_API_HASH: PUT THE API HASH HERE
labels:
- "com.centurylinklabs.watchtower.scope=octobot"
logging:
driver: "none"
volumes:
- botapi-files:/file
deploy:
restart_policy:
condition: any
bot:
entrypoint: 'python3 main.py'
environment:
ob_telegram_base_url: "http://botapi/bot"
depends_on:
- botapi
- redis
volumes:
- botapi-files:/file
volumes:
botapi-files: