Boilerplate FastAPI & Dockerfile + NGINX

This commit is contained in:
2025-09-22 17:58:16 +01:00
parent f3fbed5298
commit bf600b8e42
35 changed files with 650 additions and 0 deletions

42
nginx/configs/nginx.conf Normal file
View File

@@ -0,0 +1,42 @@
# This file should be put under /etc/nginx/conf.d/
# Or place as /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
real_ip_header X-Forwarded-For;
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;
server_tokens off;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
client_body_timeout 15;
gzip on;
gzip_vary on;
gzip_min_length 1k;
client_max_body_size 10G;
proxy_request_buffering off;
include /etc/nginx/conf.d/*.conf;
types_hash_bucket_size 128;
}