feat: add frontend + backend + database to retrieve and compute news from Yahoo

This commit is contained in:
2026-04-18 23:53:57 +02:00
parent f9b6d35c49
commit 93668273ff
84 changed files with 15431 additions and 0 deletions

43
frontend/nginx.conf Normal file
View File

@ -0,0 +1,43 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
# Gzip
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml image/svg+xml;
# Résolveur DNS Docker — résolution à la requête, pas au démarrage
resolver 127.0.0.11 valid=10s ipv6=off;
# Proxy API vers backend
location /api/ {
set $backend http://backend:8080;
proxy_pass $backend;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 3600s;
proxy_connect_timeout 10s;
proxy_send_timeout 3600s;
}
# Service Worker — ne pas mettre en cache
location = /sw.js {
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
expires 0;
}
# Assets statiques avec cache long
location /assets/ {
add_header Cache-Control "public, max-age=31536000, immutable";
}
# SPA — renvoyer index.html pour toutes les routes React
location / {
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-cache";
}
}