- 新增Redis缓存功能,用于优化仪表板统计数据查询性能 - 添加Redis连接池管理和自动降级机制,无连接时自动跳过缓存 - 配置Dockerfile支持前后端容器化部署 - 添加docker-compose编排文件实现一键部署 - 更新README文档包含新的部署方式和架构说明 - 在入库出库操作后清除相关缓存以保证数据一致性
20 lines
443 B
Nginx Configuration File
20 lines
443 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# API 代理到后端
|
|
location /api/ {
|
|
proxy_pass http://backend:8080;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
}
|
|
|
|
# Vue SPA 路由
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
}
|