Skip to content

Commit

Permalink
Fix pipeline starting ElasticSerach Service (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderlan authored Nov 14, 2024
1 parent 96de823 commit 0977a21
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ jobs:
ports:
- "5432:5432"
#endif
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:8.10.2
ports:
- "9200:9200"
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
Expand All @@ -44,7 +48,7 @@ jobs:
dotnet tool install --global dotnet-sonarscanner --version 6.1.0
- name: Install EF Core Tools
run: |
dotnet tool install --global dotnet-ef --version 8.0.1
dotnet tool install --global dotnet-ef --version 8.0.10
- name: Build and test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 0 additions & 4 deletions src/Company.Orion.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@

var builder = WebApplication.CreateBuilder(args);

builder.Configuration.ConfigureLogging();

builder.Host.UseSerilog();

builder.Services.ConfigureServices(builder.Configuration);

var app = builder.Build();

app.UseSerilogRequestLogging();

app.UseMiddleware<OrionMiddleware>();

app.ConfigureApp();
Expand Down
7 changes: 5 additions & 2 deletions src/Company.Orion.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"AllowedHosts": "*",

"Serilog": {
"Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console" ],
"AppName": "Orion Api",
"Enrich": [ "FromLogContext", "WithThreadId", "WithMachineName" ],
"IndexFormat": "orion-api",
"MinimumLevel": {
"Default": "Information",
Expand All @@ -18,6 +18,9 @@
"System": "Warning"
}
},
"Enrich": [ "FromLogContext", "WithThreadId", "WithMachineName" ]
"Using": [ "Serilog.Sinks.File", "Serilog.Sinks.Console" ]
},
"ElasticConfiguration": {
"Uri": "http://localhost:9200"
}
}

0 comments on commit 0977a21

Please sign in to comment.