文章目錄 項目地址 一、Ticketing模塊拆分 1.1 創建web api 1. 添加引用 2. 添加需要的包和配置 3. program.cs 4. docker-compose修改
項目地址
dbt
airflow
一、Ticketing模塊拆分
1.1 創建web api
1. 添加引用
<ItemGroup><ProjectReference Include="..\..\Modules\Ticketing\Evently.Modules.Ticketing.Infrastructure\Evently.Modules.Ticketing.Infrastructure.csproj" /></ItemGroup>
刪除program.cs里沒有用的服務
2. 添加需要的包和配置
Ticketing的webapi和Event.api一樣,直接復制粘貼 將Event.api里的appsettings復制到改web api只留下自己相關的 appsettings.development.json
{"ConnectionStrings": {"Database": "Host=evently.database;Port=5432;Database=evently;Username=postgres;Password=postgres;Include Error Detail=true","Cache": "evently.redis:6379","Queue": "amqp://evently-queue:5672"},"Authentication": {"Audience": "account","TokenValidationParameters": {"ValidIssuers": [ "http://evently.identity:8080/realms/evently", "http://localhost:18080/realms/evently" ]},"MetadataAddress": "http://evently.identity:8080/realms/evently/.well-known/openid-configuration","RequireHttpsMetadata": false},"KeyCloak": {"HealthUrl": "http://evently.identity:8080/health/"},"Serilog": {"Using": ["Serilog.Sinks.Console","Serilog.Sinks.Seq"],"MinimumLevel": {"Default": "Information","Override": {"Microsoft": "Information","Evently.Modules.Ticketing.Infrastructure.Outbox": "Warning","Evently.Modules.Ticketing.Infrastructure.Inbox": "Warning"}},"WriteTo": [{ "Name": "Console" },{"Name": "Seq","Args": { "serverUrl": "http://evently.seq:5341" }}],"Enrich": [ "FromLogContext", "WithMachineName", "WithThreadId" ],"Properties": {"Application": "Evently.Ticketing.Api"}},"OTEL_EXPORTER_OTLP_ENDPOINT": "http://evently.jaeger:4317"
}
3. program.cs
刪除所有需要其他模塊的配置
4. docker-compose修改