Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions aspnetcore/openshift/api/rahti2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN dotnet publish "Interface/Interface.csproj" -c Release -o out

# Runtime image
FROM mcr.microsoft.com/dotnet/aspnet:8.0
ENV TZ=Europe/Helsinki
WORKDIR /app
COPY --from=build-env /build/out .
EXPOSE 8080
Expand Down
1 change: 1 addition & 0 deletions aspnetcore/openshift/indexer/rahti2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ RUN dotnet publish "Indexer/Indexer.csproj" -c Release -o out

# Runtime image
FROM mcr.microsoft.com/dotnet/runtime:8.0
ENV TZ=Europe/Helsinki
WORKDIR /app
COPY --from=build-env /build/out .
ENTRYPOINT ["dotnet", "CSC.PublicApi.Indexer.dll"]
12 changes: 12 additions & 0 deletions aspnetcore/src/Indexer/DatabasePreflightCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ public bool IsGood()
bool isGood = true;
if (_context != null && _logger != null)
{
// Log OpenShift build information
var buildCommitHash = Environment.GetEnvironmentVariable("OPENSHIFT_BUILD_COMMIT");
if (!string.IsNullOrEmpty(buildCommitHash))
{
_logger.LogInformation(_logPrefix + "OPENSHIFT_BUILD_COMMIT: {CommitHash}", buildCommitHash);
}
var buildName = Environment.GetEnvironmentVariable("OPENSHIFT_BUILD_NAME");
if (!string.IsNullOrEmpty(buildName))
{
_logger.LogInformation(_logPrefix + "OPENSHIFT_BUILD_NAME: {BuildName}", buildName);
}

_logger.LogInformation(_logPrefix + "Check that required database tables contain data for indexing");

// Publication count
Expand Down
12 changes: 12 additions & 0 deletions aspnetcore/src/Interface/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,18 @@
.Configuration(builder.Configuration)
.CreateLogger();

// Log OpenShift build information
var buildCommitHash = Environment.GetEnvironmentVariable("OPENSHIFT_BUILD_COMMIT");
if (!string.IsNullOrEmpty(buildCommitHash))
{
Log.Information("OPENSHIFT_BUILD_COMMIT: {CommitHash}", buildCommitHash);
}
var buildName = Environment.GetEnvironmentVariable("OPENSHIFT_BUILD_NAME");
if (!string.IsNullOrEmpty(buildName))
{
Log.Information("OPENSHIFT_BUILD_NAME: {BuildName}", buildName);
}

builder.Services.AddDbContext<VirtaJtpDbContext>(options =>
// options.UseSqlServer("name=dbconnectionstringvirta"));
{
Expand Down
Loading