Self-hosting Wielerfox should be easy (standard disclaimer applies)
Here’s how to do it with Docker Compose
- clone the source
- look in share/deploy/
- copy the docker-compose.yml
- copy the default config.env and dummy secrets from secrets.env
- edit secrets.env, add this file to your
.gitignore - edit config.env
- type
docker compose up
You will have to create your first user for login with the CLI. If you are running with docker compose, you can shell into the container with docker compose exec api bash
wielerfox create-user --username mietzkatz --name 'Mietz Katz' --email 'mietz@katz'
wielerfox passwd mietzkatz
optional, to get you started immediately:
wielerfox competitions create
this will create competition for the current year for men. use –help for more information.
competitions are created also when first needed, but without start/end dates. there is a fix-dates command available, after you’ve imported the race list for that year.
Data Import
Riders, Teams, Races and Results are scraped from Procycling Stats. Please scrape responsibly. The default settings should be friendly.
My Wielerfox instance uses a session and login cookie that identifies the scraper under a paid subscriber account. Maybe you should do the same. PHPSESSID and strict rate limiting might already be enough to silence krautflare, but why save those few EUR.
initial import from Procyclingstats
also try wielerfox scrape --help!
wielerfox scrape team-list # fetch all teams for this season, create stubs for each rider
wielerfox scrape rider-details -a # fill rider stubs with details
wielerfox scrape race-list # get list of races for this season
wielerfox scrape results -a # all missing results
wielerfox scrape stage-results -a #
initial fetch can take a while!
Fetching is delegated to a dedicated job worker (you can scale that up if you feel like it). use wielerfox scrape --inline ... to run the scrape directly without the job queue.