# Interactive V3 broadcast demo as a static web service (nginx) for Cloud Run.
# Serves the renderer (core/web) + the scored race data and pre-rendered neural audio (demo/data).
# Build context = v3/broadcast/ ; see deploy/README.md. The gitignored audio clips and Cesium token
# are bundled here (kept by .gcloudignore) — run demo/record/rebuild_demo.py before deploying so the
# clips exist locally.
FROM nginx:1.27-alpine

# only the served assets (no Python)
COPY core/web        /usr/share/nginx/html/core/web
COPY demo/data       /usr/share/nginx/html/demo/data

# nginx listens on Cloud Run's $PORT — the base image runs envsubst over /etc/nginx/templates/*
# at startup (PORT is substituted; nginx vars like $uri are left alone).
COPY deploy/nginx.conf.template /etc/nginx/templates/default.conf.template

# (the base image's CMD starts nginx after templating)
