m3mo 3c513594ba Add Linode server deployment package
- Create Dockerfile for backend with Python 3.12 and gunicorn
- Add docker-compose.yml with PostgreSQL, backend, nginx, certbot
- Configure nginx reverse proxy with SSL and rate limiting
- Add deployment scripts: deploy.sh, backup-db.sh, setup-ssl.sh
- Include environment template and deployment documentation
2026-02-02 22:58:28 +01:00

48 lines
1.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"';
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 application/json application/javascript application/rss+xml application/atom+xml image/svg+xml;
# Rate limiting zones
limit_req_zone $binary_remote_addr zone=auth_limit:10m rate=5r/m;
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;
# Upstream backend
upstream backend {
server backend:8000;
keepalive 32;
}
# Include additional configs
include /etc/nginx/conf.d/*.conf;
}