Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2192c3f4c5 | |||
| 492859f17f |
@@ -3,7 +3,7 @@ name: Build and Push Docker Images Staging
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- production
|
||||
- staging
|
||||
|
||||
env:
|
||||
GIT_HOST: git.easysoft.ro
|
||||
@@ -16,7 +16,7 @@ env:
|
||||
CV_CLEANUP_JOB_IMAGE: apps/myai-cv-cleanup-job
|
||||
CV_SEARCH_JOB_IMAGE: apps/myai-cv-search-job
|
||||
PAGE_FETCHER_API_IMAGE: apps/myai-page-fetcher-api
|
||||
IMAGE_TAG: production
|
||||
IMAGE_TAG: staging
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -97,4 +97,10 @@ jobs:
|
||||
|
||||
- name: Push Page Fetcher API image
|
||||
run: |
|
||||
docker push "${REGISTRY_HOST}/${PAGE_FETCHER_API_IMAGE}:${IMAGE_TAG}"
|
||||
docker push "${REGISTRY_HOST}/${PAGE_FETCHER_API_IMAGE}:${IMAGE_TAG}"
|
||||
|
||||
- name: Reclaim disk space
|
||||
if: always()
|
||||
run: |
|
||||
docker image prune -af
|
||||
docker builder prune -af
|
||||
@@ -23,6 +23,7 @@
|
||||
<PackageVersion Include="Serilog.AspNetCore" Version="10.0.0" />
|
||||
<PackageVersion Include="Serilog.Enrichers.Environment" Version="3.0.1" />
|
||||
<PackageVersion Include="Serilog.Sinks.Console" Version="6.1.1" />
|
||||
<PackageVersion Include="Serilog.Formatting.Compact" Version="3.0.0" />
|
||||
<PackageVersion Include="Serilog.Sinks.Email" Version="4.2.1" />
|
||||
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<!-- Swagger -->
|
||||
|
||||
@@ -39,11 +39,10 @@ public static class StartupExtensions
|
||||
.ReadFrom.Configuration(context.Configuration)
|
||||
.ReadFrom.Services(services)
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithMachineName()
|
||||
.Enrich.WithEnvironmentName()
|
||||
.Enrich.WithProperty("Service", serviceName)
|
||||
.Enrich.WithProperty("Application", serviceName)
|
||||
.Enrich.WithProperty("Environment", context.HostingEnvironment.EnvironmentName)
|
||||
.Enrich.WithProperty("AppVersion", appVersion)
|
||||
.WriteTo.Console(new Serilog.Formatting.Json.JsonFormatter());
|
||||
.WriteTo.Console(new Serilog.Formatting.Compact.CompactJsonFormatter());
|
||||
|
||||
AddEmailSinkIfConfigured(configuration, context.Configuration, serviceName);
|
||||
});
|
||||
@@ -57,11 +56,10 @@ public static class StartupExtensions
|
||||
.ReadFrom.Configuration(builder.Configuration)
|
||||
.ReadFrom.Services(services)
|
||||
.Enrich.FromLogContext()
|
||||
.Enrich.WithMachineName()
|
||||
.Enrich.WithEnvironmentName()
|
||||
.Enrich.WithProperty("Service", serviceName)
|
||||
.Enrich.WithProperty("Application", serviceName)
|
||||
.Enrich.WithProperty("Environment", builder.Environment.EnvironmentName)
|
||||
.Enrich.WithProperty("AppVersion", appVersion)
|
||||
.WriteTo.Console(new Serilog.Formatting.Json.JsonFormatter());
|
||||
.WriteTo.Console(new Serilog.Formatting.Compact.CompactJsonFormatter());
|
||||
|
||||
AddEmailSinkIfConfigured(configuration, builder.Configuration, serviceName);
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<PackageReference Include="DotNetEnv" />
|
||||
<PackageReference Include="Serilog.AspNetCore" />
|
||||
<PackageReference Include="Serilog.Enrichers.Environment" />
|
||||
<PackageReference Include="Serilog.Formatting.Compact" />
|
||||
<PackageReference Include="Serilog.Sinks.Email" />
|
||||
<PackageReference Include="Serilog.Sinks.File" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" />
|
||||
|
||||
Reference in New Issue
Block a user