初始化项目文件

This commit is contained in:
2025-07-11 16:54:11 +08:00
parent 6bffd582a0
commit 39fedaac16
213 changed files with 16944 additions and 0 deletions

View File

@ -0,0 +1,96 @@
upstream api_iris {
server api_iris:8080;
}
upstream api_file {
server api_file:8081;
}
server {
listen 80;
server_name git-ylsa0.cn;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name git-ylsa0.cn;
ssl_certificate git-ylsa0.cn_bundle.crt;
ssl_certificate_key git-ylsa0.cn.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
proxy_read_timeout 600;
client_max_body_size 9000m;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
charset utf-8;
location /api/ {
proxy_pass http://api_iris/api/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /api_file/ {
proxy_pass http://api_file/api/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /admin/ {
proxy_pass http://api_iris/admin/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /static/ {
alias /static/static/;
}
location /upload/ {
internal;
alias /static/upload/;
sendfile on;
charset utf-8;
}
location /upload-note/ {
internal;
alias /static/upload-note/;
sendfile on;
charset utf-8;
}
location /upload-video/ {
internal;
alias /static/upload-video/;
sendfile on;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
charset utf-8;
}
location ^~/ws {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://api_iris/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
}
location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
autoindex on;
}
}