TelegramAktienBot/telegram_bot
Kellermann 6586ac2bfe Fixed
2022-05-13 12:25:56 +02:00
..
api_handling Reformatting 2022-05-11 23:33:48 +02:00
deploy Update Dockerfile 2022-04-26 09:46:13 +02:00
news Reformatting 2022-05-11 23:33:48 +02:00
shares managed git conflicts 2022-05-12 08:37:53 +02:00
.env.example Added timezone environment variable 2022-04-29 22:36:06 +02:00
bot_updates.py Fixed 2022-05-13 12:25:56 +02:00
bot.py Quick fix NoneType 2022-05-13 11:59:11 +02:00
Dockerfile Update Dockerfile #2 2022-04-26 09:48:34 +02:00
helper_functions.py added more markdown symbols 2022-05-12 09:28:37 +02:00
README.md Reformatting 2022-05-11 23:33:48 +02:00
requirements.txt Price converting, working with all isins now and new requirement 2022-05-08 10:37:52 +02:00

Telegram bot

Aktienbot telegram bot

Development

  1. Create virtual environment python -m venv venv
  2. Launch venv: .\venv\Scripts\activate
  3. Install requirements pip install -r telegram_bot/requirements.txt
  4. Set environment variables (see list below)
    1. Use .env-file in api directory like .env.example
    2. Or set variables using export or set commands. (Windows set, Linux export)
  5. Run api python telegram_bot/bot.py

Environment variables

    # Telegram bot api key
    BOT_API_KEY=
    
    # News api key
    NEWS_API_KEY=

Docker

docker run -d \
    --name aktienbot_bot \
    --hostname aktienbot_bot \
    --publish 80:80 \
    --env "BOT_API_KEY=" \
    --env "NEWS_API_KEY=" \
    --restart unless-stopped \
    registry.flokaiser.com/aktienbot/bot:latest

or load environment variables from file by using --env-file <filename>