Esri's, Bing's and Google's terms forbid keeping or serving pictures made from their maps, so the posters move to sources whose licence allows a kept copy: a picked Wikimedia Commons photo, USGS, PDOK and IGN's frozen 2021-2023 mosaic by country, else EOxCloudless's newest mosaic, and OpenStreetMap for the maps and the locator. What needs the network is a layer fetched once and kept whole in layers/; texts, colours, size and format are drawn on every request, and finished pictures are kept in posters/ up to 2 GB. Every picture carries its sources' credit line, X-Credits, X-License (which follows its sources) and a link to /licences. Options are checked into a named 422; the Kometa file states Jolpica's licence and versions its addresses so clients keep them for good. A layout whose trace is a point (Madring) is drawn at the circuit's location instead of failing. Claude-Session: https://claude.ai/code/session_01NcbgfJAa38xFpzy69BWrqh
117 lines
2.6 KiB
JSON
117 lines
2.6 KiB
JSON
{
|
|
"module": "f1-circuits",
|
|
"slug": "f1",
|
|
"version": "0.1",
|
|
"capabilities": [
|
|
"container-runtime"
|
|
],
|
|
"requires": [
|
|
"route"
|
|
],
|
|
"contributes": {
|
|
"route": {
|
|
"label": "f1-circuits",
|
|
"endpoint": "web"
|
|
}
|
|
},
|
|
"binds": {
|
|
"route": "${dir:state}/route.json"
|
|
},
|
|
"listens": [
|
|
{
|
|
"name": "web",
|
|
"port": 8000,
|
|
"protocol": "tcp",
|
|
"from": "mesh",
|
|
"why": "the track-layout CDN, the race posters, their licences and the Kometa metadata over http; its public name is a route grant and the proxy reaches it here. Kometa fetches the metadata and every poster by that public name"
|
|
}
|
|
],
|
|
"data": {
|
|
"own": [
|
|
{
|
|
"id": "cache",
|
|
"path": "${dir:cache}",
|
|
"class": "cache",
|
|
"why": "the race schedules asked from Jolpica, asked again when lost"
|
|
},
|
|
{
|
|
"id": "layers",
|
|
"path": "${dir:layers}",
|
|
"class": "rebuildable",
|
|
"why": "the kept layers of the posters: the map pictures, picked photos, world locators and track outlines, fetched once and kept for good; fetched again if lost"
|
|
},
|
|
{
|
|
"id": "posters",
|
|
"path": "${dir:posters}",
|
|
"class": "cache",
|
|
"why": "the finished posters and thumbnails, at most 2 GB, drawn again from the layers on demand"
|
|
}
|
|
]
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "state",
|
|
"type": "directory",
|
|
"mode": "0700",
|
|
"place": "."
|
|
},
|
|
{
|
|
"id": "cache",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "layers",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "posters",
|
|
"type": "directory",
|
|
"mode": "0700"
|
|
},
|
|
{
|
|
"id": "site-env",
|
|
"type": "file",
|
|
"path": "${dir:state}/site.env",
|
|
"mode": "0644",
|
|
"content": "F1_CIRCUITS_BASE_URL=https://${bound:route:name}\n"
|
|
},
|
|
{
|
|
"id": "server",
|
|
"type": "container",
|
|
"name": "f1-circuits",
|
|
"artifact": "cdn",
|
|
"ports": [
|
|
"8000"
|
|
],
|
|
"env-file": [
|
|
"${dir:state}/site.env"
|
|
],
|
|
"volumes": [
|
|
"${dir:cache}:/app/cache",
|
|
"${dir:layers}:/app/layers",
|
|
"${dir:posters}:/app/posters"
|
|
],
|
|
"restart-on": [
|
|
"site-env"
|
|
]
|
|
}
|
|
],
|
|
"build": {
|
|
"on": [
|
|
{
|
|
"arg": "PYTHON_BASE",
|
|
"image": "python@sha256:6d43704baacd1bfbe7c295d7f13079d5d8104ed33568873133f8fc69980419df"
|
|
}
|
|
],
|
|
"artifacts": [
|
|
{
|
|
"name": "cdn",
|
|
"kind": "image",
|
|
"from": "service/Dockerfile"
|
|
}
|
|
]
|
|
}
|
|
}
|