Files
news_all_spo/web-react/nginx.conf
jze9 9e277de65d fix: исправить URL медиа — nginx /media/ проксирует без имени бакета
- vk_parser: убрать bucket из MINIO_PUBLIC_URL (nginx добавляет /news-media/ сам)
- admin_system: добавить endpoint POST /repair-media-urls для обновления старых URL в БД
- SystemStatus: кнопка «Починить URL медиа» запускает repair endpoint
- .env.example: заменить реальные адреса/пароли на плейсхолдеры

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:44:36 +05:00

32 lines
900 B
Nginx Configuration File

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;
}