F1 Replay Timing
From Rabbi Blog
Background
This weekend while boiling maple syrup, I decided to set up F1 Replay Timing in a container to see how it went.
It took a couple of attempts, some of it was coming up to speed on apps that referenced other apps and eventually I ended up with the following for docker compose. It got passed the name resolution issue that plagued the first attempts.
My Setup
I am using Container Station on a QNAP NAS. My older NAS was extremely slow in all phases of the setup and usage (so much so that I am considering offloading everything and burning it down to rebuild it). Another beefier NAS with a fresh OS build handled this very well. The download and setup times for each race is 60-120 seconds in my experience.
You can trigger a race stats download by tagging the URL from the drop down selectors.
Format: /replay/YYYY/EVENT#/?type=EventCode
| Event | Code |
|---|---|
| Practice 1 | FP1 |
| Practice 2 | FP2 |
| Practice 3 | FP3 |
| Qualifying | Q |
| Sprint | S |
| Sprint Qualifying | SQ |
| Race | R |
Feature Request
Window dressing requests that really aren't that important:
Cached Marker
It would be really nice if the front end event selector highlighted Green (or something) if the race was locally cached already.
Caching Status
When I was dealing with the slow NAS, I was watching the backend terminal queue go by and it was neat to see how the info was being downloaded. At the time it was much longer than the 60 second warning on the screen, so I started thinking "wouldn't if be nice if..." and I thought that dividing one race track (or create a fictional track) with segments equal to the download stages (drivers, RC, etc) and having the section change to a highlighted color (like the Yellow Safety Car for example) as it downloads.
Results
It worked pretty well. I was able to watch the Suzuka race (Japan, 2026) in replay this morning and had the replay going on a computer screen. It was very interesting to watch what happens beyond the eye of the broadcast camera.
Docker Compose
services:
backend:
image: ghcr.io/adn8naiagent/f1replaytiming-backend:latest
ports:
- "8000:8000"
environment:
- FRONTEND_URL=http://192.168.1.80:3000
- DATA_DIR=/data
volumes:
- f1data:/data
- f1cache:/data/fastf1-cache
# Allows terminal attachment
stdin_open: true
tty: true
# DNS Settings
dns:
- 8.8.8.8
- 1.1.1.1
frontend:
image: ghcr.io/adn8naiagent/f1replaytiming-frontend:latest
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://192.168.1.81:8000 # Change to your backend URL if not using localhost
depends_on:
- backend
# Allows terminal attachment
stdin_open: true
tty: true
# DNS Settings
dns:
- 8.8.8.8
- 1.1.1.1
volumes:
f1data:
f1cache: