new web ract

This commit is contained in:
jze9
2026-05-15 03:31:28 +05:00
parent de78624495
commit 2335497226
58 changed files with 7397 additions and 406 deletions

32
web-react/nginx.conf Normal file
View File

@@ -0,0 +1,32 @@
server {
listen 80;
# Главное React-приложение
location / {
root /usr/share/nginx/html/app;
try_files $uri /index.html;
}
# Редактор статей (отдельный React-билд)
location /editor/ {
root /usr/share/nginx/html;
try_files $uri /editor/index.html;
}
# Статические ассеты редактора (Vite base: '/editor-assets/')
location /editor-assets/ {
alias /usr/share/nginx/html/editor/;
}
# Проксируем API-запросы на FastAPI
location /api/ {
proxy_pass http://api:8000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# Отключаем буферизацию для быстрого ответа
proxy_buffering off;
}
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
}