添加项目基础结构和配置文件
Some checks failed
CI/CD Pipeline / build (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled

This commit is contained in:
fish
2026-03-26 20:49:14 +08:00
parent 1ad8ec9be5
commit 9b08ae17fc
6 changed files with 146 additions and 0 deletions

34
deploy/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,34 @@
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://app:8000;
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 /static/ {
alias /app/static/;
expires 30d;
}
location /media/ {
alias /app/media/;
expires 30d;
}
}
}