Compare commits
2 Commits
ba54deab11
...
39201e561f
| Author | SHA1 | Date | |
|---|---|---|---|
| 39201e561f | |||
| 98705d6bbd |
@@ -1,4 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine3.22 AS build
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine3.22 AS build
|
||||||
ARG BUILD_CONFIGURATION=Release
|
ARG BUILD_CONFIGURATION=Release
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
COPY ./SfeduSchedule ./SfeduSchedule
|
COPY ./SfeduSchedule ./SfeduSchedule
|
||||||
@@ -7,7 +7,7 @@ WORKDIR /src/SfeduSchedule
|
|||||||
RUN dotnet restore "SfeduSchedule.csproj"
|
RUN dotnet restore "SfeduSchedule.csproj"
|
||||||
RUN dotnet publish "SfeduSchedule.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
RUN dotnet publish "SfeduSchedule.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS final
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app/publish .
|
COPY --from=build /app/publish .
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<OutputType>Library</OutputType>
|
<OutputType>Library</OutputType>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AssemblyName>SfeduSchedule.Plugin.Sample.plugin</AssemblyName>
|
<AssemblyName>SfeduSchedule.Plugin.Sample.plugin</AssemblyName>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<!-- Кладём зависимости плагина рядом со сборкой, чтобы загрузчик их нашёл -->
|
<!-- Кладём зависимости плагина рядом со сборкой, чтобы загрузчик их нашёл -->
|
||||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ builder.Logging.AddFilter("Quartz", LogLevel.Warning);
|
|||||||
if (!string.IsNullOrEmpty(tgChatId) && !string.IsNullOrEmpty(tgToken))
|
if (!string.IsNullOrEmpty(tgChatId) && !string.IsNullOrEmpty(tgToken))
|
||||||
builder.Logging.AddTelegram(options =>
|
builder.Logging.AddTelegram(options =>
|
||||||
{
|
{
|
||||||
|
options.FormatterConfiguration = new X.Extensions.Logging.Telegram.Base.Configuration.FormatterConfiguration
|
||||||
|
{
|
||||||
|
IncludeException = true,
|
||||||
|
IncludeProperties = true,
|
||||||
|
};
|
||||||
options.ChatId = tgChatId;
|
options.ChatId = tgChatId;
|
||||||
options.AccessToken = tgToken;
|
options.AccessToken = tgToken;
|
||||||
options.FormatterConfiguration.UseEmoji = true;
|
options.FormatterConfiguration.UseEmoji = true;
|
||||||
@@ -288,6 +293,8 @@ if (string.IsNullOrEmpty(preinstalledJwtToken))
|
|||||||
await scheduler.TriggerJob(jobKey);
|
await scheduler.TriggerJob(jobKey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
logger.LogInformation("Используем предустановленный токен из конфигурации");
|
||||||
|
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||||
|
|||||||
Reference in New Issue
Block a user