|
||
---|---|---|
.. | ||
api_handling | ||
deploy | ||
news | ||
shares | ||
.env.example | ||
bot_updates.py | ||
bot.py | ||
Dockerfile | ||
helper_functions.py | ||
README.md | ||
requirements.txt |
Telegram bot
Aktienbot telegram bot
Development
- Create virtual environment
python -m venv venv
- Launch venv:
.\venv\Scripts\activate
- Install requirements
pip install -r telegram_bot/requirements.txt
- Set environment variables (see list below)
- Use
.env
-file inapi
directory like.env.example
- Or set variables using
export
orset
commands. (Windowsset
, Linuxexport
)
- Use
- Run file
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 \
git.flokaiser.com/dhbw/aktienbot-bot:latest
or load environment variables from file by using --env-file <filename>