phase1: bootstrap containerized django stack and project scaffold

This commit is contained in:
Alfredo Di Stasio
2026-03-09 16:10:34 +01:00
parent 8cd65349c8
commit 35686bdb66
32 changed files with 655 additions and 1 deletions

51
nginx/nginx.conf Normal file
View File

@ -0,0 +1,51 @@
worker_processes auto;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
client_max_body_size 20m;
upstream django_upstream {
server web:8000;
}
server {
listen 80;
server_name _;
location /static/ {
alias /var/www/static/;
expires 30d;
access_log off;
}
location /media/ {
alias /var/www/media/;
expires 30d;
access_log off;
}
location /health/ {
proxy_pass http://django_upstream/health/;
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;
}
location / {
proxy_pass http://django_upstream;
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;
}
}
}