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