- 添加PostgreSQL数据库设计,包含部门、用户、角色、权限、项目、任务、工单、 风险、数据录入及文件附件等核心表结构及索引 - 启用pgvector和uuid-ossp扩展,支持向量存储和UUID生成 - 增加数据库表详细注释,便于后续维护与理解 - 配置Spring Boot项目支持Java 17及相关依赖(Web、PostgreSQL、MyBatis Plus、 MinIO、AWS SDK S3) - 新增Dockerfile及构建镜像脚本,支持amd及arm架构容器构建 - 提供完整Docker Compose环境配置,包含MySQL、Redis、Redis Admin、MinIO、 PhpMyAdmin及应用服务容器 - 新增Nginx反向代理配置文件,支持Admin和Client前端分离部署 - 添加一键启动Shell脚本,简化环境及应用服务启动流程 - 更新Spring Boot配置,设置active profile为dev及服务默认端口8080 - 新增Redis配置文件,开放网络访问端口与绑定所有地址
46 lines
1.3 KiB
Nginx Configuration File
46 lines
1.3 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name localhost;
|
|
index index.html index.htm default.htm default.html;
|
|
root /usr/share/nginx/html;
|
|
|
|
# 禁止访问的文件或目录
|
|
location ~ ^/(\.user.ini|\.htaccess|\.git|\.env|\.svn|\.project|LICENSE|README.md) {
|
|
return 404;
|
|
}
|
|
|
|
# 一键申请SSL证书验证目录相关设置
|
|
location ~ \.well-known {
|
|
allow all;
|
|
}
|
|
|
|
# 禁止在证书验证目录放入敏感文件
|
|
if ( $uri ~ "^/\.well-known/.*\.(php|jsp|py|js|css|lua|ts|go|zip|tar\.gz|rar|7z|sql|bak)$" ) {
|
|
return 403;
|
|
}
|
|
|
|
# API代理 - Admin/api/代理到后端(使用^~提高优先级)
|
|
location ^~ /api/ {
|
|
proxy_pass http://weform-run:8080/api/;
|
|
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 ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
|
|
expires 30d;
|
|
error_log /dev/null;
|
|
access_log /dev/null;
|
|
}
|
|
|
|
location ~ .*\.(js|css)?$ {
|
|
expires 12h;
|
|
error_log /dev/null;
|
|
access_log /dev/null;
|
|
}
|
|
|
|
access_log /var/log/nginx/client-access.log;
|
|
error_log /var/log/nginx/client-error.log;
|
|
} |