You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
.githooks | 2 years ago | |
be | 2 years ago | |
build | 2 years ago | |
docs | 2 years ago | |
fe | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
说明.txt | 2 years ago |
README.md
开发和部署方式
windows x64 下本地开发
当前项目基于 .net 6 sdk,安装 visual studio 2022 时通常会自带
supervisor 方式开发
- 根据项目需求,安装 SQL Server 或 MySQL
- 使用 build/src/win-x64/publish/ 目录下的 dev.start.cmd 和 dev.stop.cmd 管理非数据库依赖
配置文件:
- supervisor:
build\src\win-x64\publish\supervisord\supervisor.dev.conf
- nginx:
build\src\win-x64\publish\nginx\conf\nginx.conf
- gateway:
build\src\win-x64\publish\gateway\appsettings.json
- config:
build\src\win-x64\publish\gateway\wwwroot\settings\appsettings.json
- config:
build\src\win-x64\publish\gateway\wwwroot\settings\appsettings.Development.json
flowchart LR
nginx --localhost:21093--> gateway--localhost:59092--> api:59092
api:59092 --localhost:6379--> redis:6379
api:59092 --localhost:13319--> database:13319
gateway --localhost:8086--> influxdb:8086
Docker Desktop 方式开发
- 无需按照数据库
- 使用 build/src/docker/publish/ 目录下的 dev.start.cmd 和 dev.stop.cmd 管理依赖
部署
windows x64 supervisor 方式部署
- 执行:
build\src\win-x64\build.cmd
- 上传:
build\dist\win-x64\publish
目录到服务器 - 修改配置,执行 publish 目录下的 start.cmd
docker compose 方式部署
- 还行:
build\src\docker\build.cmd
- 上传:
build\dist\win-x64\publish
目录到服务器 - 修改配置,执行 publish 目录下的 start.sh 或 start.cmd
构建时的处理:
- 复制并重命名 build\src\win-x64\publish\nginx\conf 到 build\dist\docker\publish\conf\nginx,保持nginx的配置文件统一在 build\src\win-x64\publish\nginx\conf 目录维护
- 复制 build\src\win-x64\publish\gateway 到 build\dist\docker\publish\gateway,保持网关的配置和应用的配置统一在 build\src\win-x64\publish\gateway 目录维护