service-update-alerts/README.md
Jeena 4ab799c156 feat: Add Matrix notifications
Send Matrix alerts for updates and errors, and document the required bot credentials.
2026-03-12 15:23:45 +00:00

51 lines
1 KiB
Markdown

# check-for-updates
Small Python script to compare running service versions against upstream releases.
## Requirements
- Python 3.10+
## Setup
Create and activate a virtual environment, then install dependencies:
```bash
python -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
```
Copy `.env.sample` to `.env` and fill required values. Export the variables before running the script:
```bash
export PAPERLESS_API_TOKEN=...
export FRESHRSS_USERNAME=...
export FRESHRSS_PASSWORD=...
export MATRIX_HOMESERVER=...
export MATRIX_ROOM_ID=...
export MATRIX_ACCESS_TOKEN=...
```
The script also reads `.env` automatically if present.
The Matrix bot will attempt to join the configured room automatically if it is not already a member.
## Usage
```bash
python3 check_updates.py --config services.yaml
python3 check_updates.py --config services.yaml --all
```
## Tests
```bash
python -m pytest
```
To run live integration checks against the real services:
```bash
RUN_LIVE_TESTS=1 python -m pytest tests/test_live_services.py
```