Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Oct 19, 2023
1 parent 342e2e4 commit ffcc7d1
Show file tree
Hide file tree
Showing 79 changed files with 1,330 additions and 1,615 deletions.
10 changes: 9 additions & 1 deletion App/App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="8.0.0-preview.4.23260.4" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0-preview.4.23259.5" />
<PackageReference Include="Mime-Detective" Version="22.12.14" />
<PackageReference Include="Mime-Detective" Version="23.10.1" />
<PackageReference Include="Minio" Version="5.0.0" />
<PackageReference Include="NetEscapades.Configuration.Yaml" Version="3.1.0" />
<PackageReference Include="NJsonSchema" Version="10.9.0" />
Expand Down Expand Up @@ -82,5 +82,13 @@
</Content>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Domain\Domain.csproj" />
</ItemGroup>

<ItemGroup>
<Folder Include="Migrations\" />
</ItemGroup>


</Project>
4 changes: 4 additions & 0 deletions App/Config/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,10 @@
"type": "string",
"minLength": 1
},
"Issuer": {
"type": "string",
"minLength": 1
},
"TokenValidation": {
"$ref": "#/definitions/Auth/definitions/TokenValidationParametersOption"
},
Expand Down
14 changes: 7 additions & 7 deletions App/Config/settings.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Logging:

App:
Landscape: lapras
Platform: carboxylicacid
Platform: sulfone
Service: dotnet
Module: api
Version: 1.0.0
Expand Down Expand Up @@ -140,7 +140,7 @@ ErrorPortal:
EnableExceptionResponse: true
Database:
Main:
Host: carboxylicacid-dotnet-main-database
Host: sulfone-dotnet-main-database
Port: 5432
User: user
Password: supersecret
Expand All @@ -149,14 +149,14 @@ Database:
Timeout: 30
BlockStorage:
Main:
Host: carboxylicacid-dotnet-main-storage
Host: sulfone-dotnet-main-storage
Port: 9000
Scheme: http
AccessKey: rootuser
SecretKey: supersecret
UseSSL: false
EnsureBucketCreation: true
Bucket: carboxylicacid-dotnet-main
Bucket: sulfone-dotnet-main
Policy: Public # or Private
Cache:
Enabled: true
Expand All @@ -168,18 +168,18 @@ Cache:
Password: supersecret
SSL: false
Endpoints:
- carboxylicacid-dotnet-main-cache:6379
- sulfone-dotnet-main-cache:6379

HttpClient:
Main:
BaseAddress: http://carboxylicacid-analytics:9050
BaseAddress: http://sulfone-analytics:9050
Timeout: 30
BearerAuth: supersecret

Auth:
Enabled: true
Settings:
Domain: carboxylicacid
Domain: sulfone
Audience: aud
TokenValidation:
NameClaimType: sub
Expand Down
35 changes: 8 additions & 27 deletions App/Config/settings.lapras.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,33 @@ App:
EnableSwagger: true
GenerateConfig: true
Swagger:
Title: Lapras CarboxylicAcid Carbon API
Title: Lapras Sulfone Zinc API
# OTEL
Logs:
Exporter:
Console:
Enabled: false
Otlp:
Enabled: true
Enabled: false
Trace:
Exporter:
Otlp:
Enabled: true
Enabled: false

Metrics:
Exporter:
Otlp:
Enabled: true
Enabled: false

# Infra-based
Database:
Main:
Host: carboxylicacid-carbon-main-database
Host: sulfone-zinc-main-database
User: admin
Password: supersecret
AutoMigrate: true
Cache:
Main:
Password: supersecret
Endpoints:
- carboxylicacid-carbon-main-cache:6379
SSL: false
Alt:
Password: supersecret
Endpoints:
- carboxylicacid-carbon-alt-cache:6379
SSL: false
BlockStorage:
Main:
Host: carboxylicacid-carbon-main-storage
Bucket: carboxylicacid-carbon-main
Port: 9000
AccessKey: admin
SecretKey: supersecret
Scheme: http
UseSSL: false
EnsureBucketCreation: true
Policy: Public # or Private

Cache: {}
BlockStorage: {}
# external
HttpClient: {}
206 changes: 25 additions & 181 deletions App/Config/settings.pichu.yaml
Original file line number Diff line number Diff line change
@@ -1,207 +1,51 @@
$schema: ./schema.json
# Native
App:
Landscape: pichu
Platform: carboxylicacid
Service: dotnet
Module: api
Version: 1.0.0
EnableSwagger: true
DefaultCors: AllowAll
Mode: Server
Kestrel:
Endpoints:
Http:
Url: http://+:9050
AllowedHosts: "*"
Logging:
LogLevel:
Default: None
Console:
LogLevel:
Default: Information
OpenTelemetry:
IncludeFormattedMessage: true
IncludeScopes: true
ParseStateValues: true
GenerateConfig: false
Swagger:
Title: Pichu Sulfone Zinc API
# OTEL
Logs:
Exporter:
Console:
Enabled: false
Otlp:
Enabled: false
Endpoint: ""
ProcessorType: Batch # or simple
Protocol: Grpc # or HttpProtobuf
Timeout: 30000
BatchSize: 512
QueueSize: 2048
Delay: 5000
Headers: ""
Trace:
Instrument:
EFCore:
Enabled: true
SetDbStatementForStoredProcedure: true
SetDbStatementForText: false
AspNetCore:
Enabled: true
GrpcSupport: true
RecordException: true
HttpClient:
Enabled: true
RecordException: true
SqlClient:
Enabled: false
RecordException: true
SetDbStatementForStoredProcedure: true
EnableConnectionLevelAttributes: true
SetDbStatementForText: true
GrpcClient:
Enabled: true
RecordException: true
Trace:
Exporter:
Console:
Enabled: false
Otlp:
Enabled: false
Endpoint: ""
Timeout: 30000
ProcessorType: Batch # or simple
Protocol: Grpc # or HttpProtobuf
BatchSize: 512
QueueSize: 2048
Delay: 5000
Headers: ""
Enabled: true

Metrics:
Instrument:
AspNetCore: true
HttpClient: true
Process: true
Runtime: true
Exporter:
Console:
Enabled: false
ExportInterval: 1000
Otlp:
Enabled: false
Endpoint: ""
ExportInterval: 1000
Timeout: 30000
ProcessorType: Batch # or simple
Protocol: Grpc # or HttpProtobuf
BatchSize: 512
QueueSize: 2048
Delay: 5000
Headers: ""
Swagger:
Title: Pichu CarboxylicAcid .NET API
Description: Pichu CarboxylicAcid .NET API
OpenApiContact:
Name: kirinnee
Email: kirinnee97@gmail.com
Url: https://kirinnee.dev
Cors:
- Name: AllowAll
SupportsCredentials: true
PreflightMaxAge: 600
ErrorPortal:
Enabled: false
Scheme: http
Host: localhost:3000
EnableExceptionResponse: false
Enabled: true

# Infra-based
Database:
Main:
Host: carboxylicacid-dotnet-main-database
Port: 5432
User: user
Host: sulfone-zinc-main-database
User: admin
Password: supersecret
Database: api
AutoMigrate: true
Timeout: 30
Cache:
Main:
Password: supersecret
Endpoints:
- sulfone-zinc-main-cache:6379
SSL: false
BlockStorage:
Main:
Host: carboxylicacid-dotnet-main-storage
Host: sulfone-zinc-main-storage
Bucket: sulfone-zinc-main
Port: 9000
Scheme: http
AccessKey: rootuser
AccessKey: admin
SecretKey: supersecret
Scheme: http
UseSSL: false
EnsureBucketCreation: true
Bucket: carboxylicacid-dotnet-main
Policy: Public # or Private
Cache:
Enabled: true
Settings:
AbortConnect: true
AllowAdmin: false
ConnectRetry: 3
Password: supersecret
SSL: false
SyncTimeout: 5000
Endpoints:
- carboxylicacid-dotnet-main-cache:6379
SearchEngine:
Main:
Host: carboxylicacid-dotnet-search
Scheme: http
Port: 7700
MasterKey: supersecret
Create: true
PrimaryKey: id
Index: Main
MigrationTimeout: 60
Settings:
DisplayedAttributes:
- "*"
FilterAttributes: []
SearchableAttributes:
- "*"
SortableAttributes:
- "*"
RankingRules:
- words
- typo
- proximity
- attribute
- sort
- exactness
StopWords: []
Synonyms: {}
DistinctAttribute: null
TypoTolerance:
Enabled: true
MinWordSizeForTypos:
OneTypo: 4
TwoTypos: 8
DisableOnWords: []
DisableOnAttributes: []
Faceting:
MaxValuesPerFacet: 100
Pagination:
MaxTotalHits: 100000000
HttpClient:
Main:
BaseAddress: http://carboxylicacid-analytics:9050
Timeout: 30
BearerAuth: supersecret
Auth:
Enabled: false
Settings:
Domain: carboxylicacid
Audience: aud
TokenValidation:
ValidateIssuer: true
ValidateAudience: true
ValidateLifetime: true
ValidateIssuerSigningKey: true
ClockSkew: 0
Policies:
admin/internal:
Type: All
Scopes:
- internal
- admin
admin:
Type: Any
Scopes:
- admin
# external
HttpClient: {}
Loading

0 comments on commit ffcc7d1

Please sign in to comment.