Zyknow.Abp.Microservice.Template
1.0.0-preview.10
See the version list below for details.
dotnet new install Zyknow.Abp.Microservice.Template::1.0.0-preview.10
Zyknow.Abp.Microservice
English| 简体中文
Introduction
This project is a microservice template based on the ABP Framework and reference form antosubash/AbpMicroservice, to using dotnet new to create microservice project and microservice service template project.
Nuget Packages
Name | Version | Download |
---|---|---|
Zyknow.Abp.Microservice.Template |
Features
- Microservice Template
- Microservice Service Template
-
Kibana
+Elasticsearch
Distributed Log Query -
Grafana
+rometheus
Monitoring Center -
OpenTelemetry
Jaeger
Distributed tracing -
Apollo
Configuration Center -
Yarp
Gateway -
RabbitMQ
Message Queue -
Minio
Distributed Storage -
Tye
Support -
Blazor Server
Web App- Use Masa Blazor UI
-
Vue3 Quasar
Web App- Basic Pages
-
Avalonia
Startup Template -
Maui
Startup App -
DockerFile
-
K8s
k8s Template
Usage
Using Dotnet Create You Microservice Project
- install microservice template on dotnet
dotnet new install Zyknow.Abp.Microservice.Template
Create Microservice Project
dotnet new zabp-ms -n YourMicroserviceName
Create New Service And Use
you better run the command in services folder
dotnet new zabp-ms-s -n YourServiceProjectName
copy
YourServiceProjectName\YourServiceProjectName.ps1
to services folder and run. that will fix the service folder path,and add service totye.yaml
,add to root sln,you can see all code in YourServiceProjectName\YourServiceProjectName.ps1⚠️ ** please save you all data or to submit git。
./YourServiceProjectName.ps1
after run,you can see like this,and you can delete this script.
(base) PS G:\Mj\MijinLibrary\services> .\MijinLibrary.BookInfoService.ps1
------------------------------------------------------------------
------------------------------------------------------------------
##########################################检查路径##############################################
检查完成
##########################################修改文件夹名##############################################
文件夹已重命名为 book-info。
修改完成
####################################修复替换项目文件名称以及文件和文件夹####################################
ProjectName: BookInfo
slnName: MijinLibrary
替换完成
####################################添加到Root解决方案####################################
找到解决方案文件: G:\Mj\MijinLibrary\MijinLibrary.sln
找到解决方案文件: G:\Mj\MijinLibrary\MijinLibrary.sln
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Application\MijinLibrary.BookInfoService.Application.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Application\MijinLibrary.BookInfoService.Application.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Application.Contracts\MijinLibrary.BookInfoService.Application.Contracts.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Application.Contracts\MijinLibrary.BookInfoService.Application.Contracts.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Domain\MijinLibrary.BookInfoService.Domain.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Domain\MijinLibrary.BookInfoService.Domain.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.Domain.Shared\MijinLibrary.BookInfoService.Domain.Shared.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.Domain.Shared\MijinLibrary.BookInfoService.Domain.Shared.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.EntityFrameworkCore\MijinLibrary.BookInfoService.EntityFrameworkCore.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.EntityFrameworkCore\MijinLibrary.BookInfoService.EntityFrameworkCore.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi\MijinLibrary.BookInfoService.HttpApi.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi\MijinLibrary.BookInfoService.HttpApi.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Client\MijinLibrary.BookInfoService.HttpApi.Client.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Client\MijinLibrary.BookInfoService.HttpApi.Client.csproj”添加到解决方案中。
正在添加项目: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\MijinLibrary.BookInfoService.HttpApi.Host.csproj
已将项目“services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\MijinLibrary.BookInfoService.HttpApi.Host.csproj”添加到解决方案中。
操作完成
###############################修改端口号/添加端口号到网关和Auth Service####################################
请输入该服务的端口号: 51000
已更新文件: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\appsettings.json
已更新文件: G:\Mj\MijinLibrary\services\book-info\src\MijinLibrary.BookInfoService.HttpApi.Host\Properties\launchSettings.json
开始添加端口号到网关和Auth Service
指定的URL已存在于文件: G:\Mj\MijinLibrary\gateways\internal\src\MijinLibrary.InternalGateway\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\gateways\internal\src\MijinLibrary.InternalGateway\appsettings.json.FullName
指定的URL已存在于文件: G:\Mj\MijinLibrary\gateways\web\src\MijinLibrary.WebGateway\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\gateways\web\src\MijinLibrary.WebGateway\appsettings.json.FullName
指定的URL已存在于文件: G:\Mj\MijinLibrary\apps\auth-server\src\MijinLibrary.AuthServer\bin\Debug\net7.0\appsettings.json.FullName 中。
已更新文件: G:\Mj\MijinLibrary\apps\auth-server\src\MijinLibrary.AuthServer\appsettings.json.FullName
操作完成
###############################添加到tye和prometheus.yml####################################
已添加内容到 G:\Mj\MijinLibrary\tye.yaml。
修改prometheus.yml
已添加内容到 G:\Mj\MijinLibrary\etc\prometheus\prometheus.yml。
###############################更新DbMigrator Appsettings.json####################################
指定的ConnectionStrings已存在于 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\bin\Debug\net7.0\appsettings.json 中。
指定的OpenIddict/Resources已存在于 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\bin\Debug\net7.0\appsettings.json 中。
已添加ConnectionStrings内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\appsettings.json。
已添加OpenIddict/Resources内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.DbMigrator\appsettings.json。
操作完成
###############################添加到AppServiceConsts####################################
已添加常量内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.Shared.Definition\AppServiceConsts.cs。
已添加字典内容到 G:\Mj\MijinLibrary\shared\MijinLibrary.Shared.Definition\AppServiceConsts.cs。
操作完成
- build you sln and run tye
dotnet build ./run-tye.ps1
Run Microservice
Run Docker Compose in ms\src\etc\docker
select you need docker environment dependency
dev_up.ps1
is lowest environment dependencyup.ps1
is full environment dependency
run docker compose on powershell
./dev_up.ps1
or
./up.ps1
install ssl certificate in src\etc\dev-cert\localhost.pfx
you must install ssl certificate in you local machine,otherwise https will report an error
or delete localhost.pfx
,run-tye.ps1
will create a new certificate
build microservice project in src
dotnet build
run
you also can use -p
to change tye port,like ./run-tye.ps1 -p 8001
./run-tye.ps1
or watch run
./run-tye.ps1 --watch
Thanks
Author
License
You can check out the full license here
This project is licensed under the terms of the MIT license.
-
net7.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0-preview.11 | 106 | 8/24/2023 |
1.0.0-preview.10 | 74 | 8/24/2023 |
1.0.0-preview.9 | 69 | 8/24/2023 |
1.0.0-preview.8 | 73 | 8/24/2023 |
1.0.0-preview.7 | 80 | 8/23/2023 |
1.0.0-preview.6 | 86 | 8/13/2023 |
1.0.0-preview.5 | 78 | 8/13/2023 |