Deploy to Git Pages / build-and-deploy (push) Failing after 19s
React + Vite static site demonstrating the CRDC School Arrest Rate API. Features 6 interactive charts comparing observed arrest data against Bayesian model estimates across U.S. school districts, with Civilytics visual identity. - State selector and district search with 'interesting' suggestions (top arrests) - Animated histogram loading grid showing posterior draw progress - Charts: time series, rate by group, district vs national, model comparison quadrants, density proxy, exceedance probability - Static JSON fixture for national rates (no API changes needed) - Dockerfile + docker-compose.yml for self-hosted deployment - GitHub Actions workflow and _config.yml for Git Pages
29 lines
828 B
Nginx Configuration File
29 lines
828 B
Nginx Configuration File
# nginx config for CRDC Arrests Demo — static SPA with proper caching.
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
# Serve static files from the Vite build output
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# Civilytics design tokens: immutable cache headers (data doesn't change between releases)
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff2|ttf)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, max-age=31536000, immutable";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# SPA fallback — all routes serve index.html (client-side routing)
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# Health check endpoint for container orchestration
|
|
location /healthz {
|
|
access_log off;
|
|
return 200 "ok";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
}
|