TelegramAktienBot/telegram_bot/README.md

39 lines
905 B
Markdown
Raw Permalink Normal View History

# Telegram bot
Aktienbot telegram bot
## Development
2022-05-11 21:33:48 +00:00
2022-05-02 15:34:44 +00:00
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)
2022-05-11 21:33:48 +00:00
1. Use `.env`-file in `api` directory like `.env.example`
2. Or set variables using `export` or `set` commands. (Windows `set`, Linux `export`)
2022-05-12 17:13:00 +00:00
5. Run file `python telegram_bot/bot.py`
## Environment variables
2022-05-11 21:33:48 +00:00
```
# Telegram bot api key
BOT_API_KEY=
# News api key
NEWS_API_KEY=
```
## Docker
2022-05-11 21:33:48 +00:00
```
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
```
2022-05-11 21:33:48 +00:00
2022-05-02 15:17:32 +00:00
or load environment variables from file by using `--env-file <filename>`