Config docker

This commit is contained in:
ifaryd
2026-05-15 11:20:16 +00:00
parent a6ad4b525b
commit 4a5cea4a7f
15 changed files with 89 additions and 36 deletions

37
nginx/nginx.local.conf Normal file
View File

@@ -0,0 +1,37 @@
upstream django {
server web:8000;
}
server {
listen 80;
server_name localhost 127.0.0.1;
client_max_body_size 10M;
location /static/ {
alias /app/staticfiles/;
expires 30d;
access_log off;
}
location /media/careers/cvs/ {
deny all;
return 404;
}
location /media/ {
alias /app/media/;
expires 7d;
access_log off;
}
location / {
proxy_pass http://django;
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_redirect off;
proxy_read_timeout 60s;
}
}