All checks were successful
continuous-integration/drone/push Build is passing
- Add nginx/default.conf with simplified configuration to fix "no events section" error - Update docker-compose.yml to mount nginx/default.conf instead of nginx.conf - Fix backend/daemons.py data path from backend/data/daemons.json to data/daemons.json - Improve users.json path detection with fallback logic in daemons.py - Add servers directory to .gitignore - Create DOCKER_FIX.md documentation with troubleshooting steps and solutions - Ensure data directory is created automatically when backend starts
62 lines
1.8 KiB
Plaintext
62 lines
1.8 KiB
Plaintext
upstream mc_panel {
|
|
server mc-panel:8000;
|
|
}
|
|
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
client_max_body_size 100M;
|
|
|
|
# API endpoints
|
|
location /api/ {
|
|
proxy_pass http://mc_panel;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection 'upgrade';
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
proxy_cache_bypass $http_upgrade;
|
|
|
|
# Таймауты
|
|
proxy_connect_timeout 60s;
|
|
proxy_send_timeout 60s;
|
|
proxy_read_timeout 60s;
|
|
}
|
|
|
|
# WebSocket для консоли
|
|
location /ws/ {
|
|
proxy_pass http://mc_panel;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# WebSocket таймауты
|
|
proxy_connect_timeout 7d;
|
|
proxy_send_timeout 7d;
|
|
proxy_read_timeout 7d;
|
|
}
|
|
|
|
# Статические файлы фронтенда
|
|
location / {
|
|
proxy_pass http://mc_panel;
|
|
proxy_http_version 1.1;
|
|
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_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
# Health check
|
|
location /health {
|
|
access_log off;
|
|
return 200 "healthy\n";
|
|
add_header Content-Type text/plain;
|
|
}
|
|
} |