mirror of
https://github.com/yawaflua/Aoyo.Taiga.git
synced 2025-12-09 20:09:28 +02:00
Fix dockerfile and logger from DiscordHandler.cs
This commit is contained in:
@@ -40,7 +40,24 @@ public class DiscordHandler(
|
|||||||
|
|
||||||
private Task ClientOnLog(LogMessage arg)
|
private Task ClientOnLog(LogMessage arg)
|
||||||
{
|
{
|
||||||
logger.LogInformation(exception: arg.Exception, message:arg.Message);
|
switch (arg.Severity)
|
||||||
|
{
|
||||||
|
case LogSeverity.Info:
|
||||||
|
logger.LogInformation(arg.Message);
|
||||||
|
break;
|
||||||
|
case LogSeverity.Warning:
|
||||||
|
logger.LogWarning(arg.Message);
|
||||||
|
break;
|
||||||
|
case LogSeverity.Error:
|
||||||
|
logger.LogError(exception: arg.Exception, message: arg.Message);
|
||||||
|
break;
|
||||||
|
case LogSeverity.Critical:
|
||||||
|
logger.LogCritical(arg.Exception, message: arg.Message);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
logger.LogTrace(arg.Message);
|
||||||
|
break;
|
||||||
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,9 +20,11 @@ RUN dotnet publish "./Aoyo.Taiga.csproj" -c $BUILD_CONFIGURATION -o /app/publish
|
|||||||
FROM base AS final
|
FROM base AS final
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=publish /app/publish .
|
COPY --from=publish /app/publish .
|
||||||
RUN sudo apt-get update && \
|
USER root
|
||||||
sudo apt-get install -y curl && \
|
RUN apt-get update && \
|
||||||
sudo rm -rf /var/lib/apt/lists/*
|
apt-get install -y curl && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
USER $APP_UID
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD curl -f http://localhost:8080/aoyo/health || exit 1
|
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD curl -f http://localhost:8080/aoyo/health || exit 1
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user