fix(docker): simplify deployment with nginx fixes and alternative compose config
All checks were successful
continuous-integration/drone/push Build is passing

- Update nginx/default.conf with complete configuration including events section
- Add docker-compose-simple.yml for simplified deployment without nginx
- Update docker-compose.yml to properly mount nginx configuration
- Revise DOCKER_FIX.md with clearer instructions and recommended solutions
- Provide three deployment variants: with nginx, without nginx (recommended), and quick fix
- Include data folder structure and environment setup documentation
This change addresses nginx configuration errors and FileNotFoundError by providing both a corrected nginx setup and a simplified alternative deployment method without nginx for faster troubleshooting and deployment.
This commit is contained in:
2026-01-17 10:50:00 +06:00
parent e02789ef53
commit c0125f3962
4 changed files with 225 additions and 195 deletions

View File

@@ -1,62 +1,78 @@
upstream mc_panel {
server mc-panel:8000;
events {
worker_connections 1024;
}
server {
listen 80;
server_name _;
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
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;
upstream mc_panel {
server mc-panel:8000;
}
# 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;
}
server {
listen 80;
server_name _;
# Статические файлы фронтенда
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;
}
# 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;
}
# Health check
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
# 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;
}
}
}