Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
75 lines
2.2 KiB
Nginx Configuration File
75 lines
2.2 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes auto;
|
|
error_log /var/log/nginx/error.log warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events {
|
|
worker_connections 1024;
|
|
use epoll;
|
|
multi_accept on;
|
|
}
|
|
|
|
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" '
|
|
'rt=$request_time uct="$upstream_connect_time" '
|
|
'uht="$upstream_header_time" urt="$upstream_response_time"';
|
|
|
|
access_log /var/log/nginx/access.log main;
|
|
|
|
sendfile on;
|
|
tcp_nopush on;
|
|
tcp_nodelay on;
|
|
keepalive_timeout 65;
|
|
types_hash_max_size 2048;
|
|
|
|
# Gzip compression
|
|
gzip on;
|
|
gzip_vary on;
|
|
gzip_proxied any;
|
|
gzip_comp_level 6;
|
|
gzip_types text/plain text/css text/xml text/javascript application/json application/javascript application/xml+rss application/rss+xml application/atom+xml image/svg+xml;
|
|
|
|
# Security headers
|
|
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
add_header X-Content-Type-Options "nosniff" always;
|
|
add_header X-XSS-Protection "1; mode=block" always;
|
|
add_header Referrer-Policy "no-referrer-when-downgrade" always;
|
|
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline'" always;
|
|
|
|
# Rate limiting
|
|
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;
|
|
limit_req_zone $binary_remote_addr zone=auth_limit:10m rate=5r/m;
|
|
|
|
# Upstream services
|
|
upstream orchestrator {
|
|
server orchestrator:3001 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
upstream claude_agent {
|
|
server claude-agent:3002 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
upstream gramjs_adapter {
|
|
server gramjs-adapter:3003 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
upstream safety_guard {
|
|
server safety-guard:3004 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
upstream analytics {
|
|
server analytics:3005 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
upstream ab_testing {
|
|
server ab-testing:3006 max_fails=3 fail_timeout=30s;
|
|
}
|
|
|
|
# Include additional configuration files
|
|
include /etc/nginx/conf.d/*.conf;
|
|
} |