- A1: scripts/backup-postgres.sh — pg_dump quotidien compressé → Backblaze B2 (rclone), rétention 30j - A2: StatusController retourne HTTP 503 + healthy/alertReason si dernière observation > 6h - A4: Dockerfile installe tippecanoe, GenerateTilesCommand génère 5 tilesets (obs + h6/12/24/48), Caddyfile sert /tiles/* sans fallback SPA, SargassesMap.jsx passe en sources vector tiles statiques - chore: backend/public/assets/ ajouté au .gitignore (build artifacts) - chore: setup vitest frontend + ImpactScoreServiceTest (session précédente) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
46 lines
938 B
Caddyfile
46 lines
938 B
Caddyfile
{
|
|
frankenphp
|
|
order php_server before file_server
|
|
}
|
|
|
|
:80 {
|
|
root * /app/public
|
|
|
|
header {
|
|
X-Frame-Options "DENY"
|
|
X-Content-Type-Options "nosniff"
|
|
Referrer-Policy "strict-origin-when-cross-origin"
|
|
Permissions-Policy "camera=(), microphone=(), geolocation=()"
|
|
-Server
|
|
}
|
|
|
|
# Assets Symfony (webpack encore)
|
|
handle /bundles/* {
|
|
file_server
|
|
}
|
|
|
|
# Service worker (must be served from root scope)
|
|
handle /sw.js {
|
|
file_server
|
|
}
|
|
|
|
# API → Symfony front controller
|
|
handle /api/* {
|
|
php_server
|
|
}
|
|
|
|
# Vector tiles (.pbf) — pas de fallback SPA, retourner 404 si absent
|
|
handle /tiles/* {
|
|
header Content-Type "application/x-protobuf"
|
|
file_server
|
|
}
|
|
|
|
# SPA React : try static files first, fallback to index.html
|
|
handle {
|
|
try_files {path} /index.html
|
|
file_server
|
|
}
|
|
|
|
encode gzip
|
|
}
|