#2 Season hero photo as poster bg + switch to Alpine image

已合并
jschoubben 1周前 将 2 次代码提交从 feat/season-poster-bg合并至 master
jschoubben 评论于 2 周前

Season poster bg: render_season_poster() now pulls https://files-api.novox.be/dilbert/sports/formula1/cars/{year}.jpg, cover-fits into 1000×1500, and overlays a vertical dark gradient so the wordmark/year/footer stay legible over any underlying photo. Falls back to the previous all-black layout if the file isn't there.

Image:

  • python:3.12-slimpython:3.12-alpine. Debian was the lazy default; Alpine is the appropriate weight for this service.
  • fonts-dejavu-corettf-liberation. Same Liberation Sans Bold that Arch installs on the dev host (/usr/share/fonts/liberation/LiberationSans-Bold.ttf), so posters render byte-identical in dev and prod.
  • Drop fastf1 from the pip install — not imported anywhere in the served code paths. Removes pandas/matplotlib/scipy tail.
  • Add numpy explicitly (was pulled in transitively by fastf1; models/geo_json/geometry.py imports it at module load for vector ops).

Verified locally:

  • docker build succeeds.
  • Container start renders both /posters/race/Monaco Grand Prix/2025.png and /posters/season/2025.png cleanly.
  • Image size: 194 MB.
**Season poster bg:** `render_season_poster()` now pulls `https://files-api.novox.be/dilbert/sports/formula1/cars/{year}.jpg`, cover-fits into 1000×1500, and overlays a vertical dark gradient so the wordmark/year/footer stay legible over any underlying photo. Falls back to the previous all-black layout if the file isn't there. **Image:** - `python:3.12-slim` → `python:3.12-alpine`. Debian was the lazy default; Alpine is the appropriate weight for this service. - `fonts-dejavu-core` → `ttf-liberation`. Same Liberation Sans Bold that Arch installs on the dev host (`/usr/share/fonts/liberation/LiberationSans-Bold.ttf`), so posters render byte-identical in dev and prod. - Drop `fastf1` from the pip install — not imported anywhere in the served code paths. Removes pandas/matplotlib/scipy tail. - Add `numpy` explicitly (was pulled in transitively by fastf1; `models/geo_json/geometry.py` imports it at module load for vector ops). **Verified locally:** - `docker build` succeeds. - Container start renders both `/posters/race/Monaco Grand Prix/2025.png` and `/posters/season/2025.png` cleanly. - Image size: 194 MB.
jschoubben1周前 关闭
该合并请求已作为 4a2e9f5d63 被合并。
登陆 并参与到对话中。
未选择标签
未选择里程碑
未指派成员
1 名参与者
到期时间

未设置到期时间。

依赖工单

此合并请求当前没有任何依赖。

正在加载...
取消
保存
这个人很懒,什么都没留下。