7c9db4d7050e29ee0c6256414da28be963cfd99e
willhaben-tracker
Telegram bot + scraper for willhaben.at classified ads. Self-hosted on Unraid via Docker Compose.
Stack
- Postgres 15 with logical WAL, init scripts run alphabetically on first boot
- PostgREST — auto-generated REST API over Postgres
publicschema - Kong — reverse proxy routing
/rest/v1/to PostgREST - Supabase Studio — database browser and management UI
- Python worker — Telegram long polling + scrape scheduler
Services
| Service | Image | Port | Description |
|---|---|---|---|
| db | postgres:15-alpine | 55632 |
PostgreSQL with init migrations |
| rest | postgrest/postgrest:v12.2.0 | internal | REST API over Postgres |
| kong | kong:2.8.1 | 55621 |
API gateway / reverse proxy |
| studio | supabase/studio | 55630 |
Supabase dashboard UI |
| meta | supabase/postgres-meta:v0.84.2 | internal | Database introspection for Studio |
| worker | custom (./worker) | none | Bot + scraper process |
Quick Start
cp .env.example .env
# Edit TELEGRAM_BOT_TOKEN and POSTGRES_PASSWORD in .env
docker compose up -d --build
On first boot, Postgres init scripts run automatically in order:
00-run-init.sh— creates roles (authenticator, dashboard_user)01-init.sql— creates tables and indexespost-boot.sql— applies grants on created tables
Deployment
Unraid + Portainer
- Set the Docker Compose project path to
/mnt/user/appdata/willhaben-tracker - Ensure
.envis present with valid credentials - Deploy via Portainer: Stacks → Add stack, paste
docker-compose.ymlcontents and attach.env - Postgres data persists at
/mnt/user/appdata/willhaben-tracker/data/db
Manual (Linux)
cd /path/to/willhaben-tracker
cp .env.example .env
# Edit .env with your credentials
docker compose up -d --build
Telegram Commands
/start— Welcome + usage instructions (whitelisted only)/add "keyword"— Create new search query/list— Show active queries/pause <id>//resume <id>— Toggle query/delete <id>— Remove query/stats— Tracking statistics
Description
Languages
Python
98.6%
Shell
1.1%
Dockerfile
0.3%