diff --git a/Nocr.TextMatcher.sln b/Nocr.TelegramListener.sln similarity index 73% rename from Nocr.TextMatcher.sln rename to Nocr.TelegramListener.sln index 3cf1182..5ff4cb1 100644 --- a/Nocr.TextMatcher.sln +++ b/Nocr.TelegramListener.sln @@ -8,11 +8,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TextMatcher.Core", "src\Nocr.TextMatcher.Core\Nocr.TextMatcher.Core.csproj", "{3E87693C-78DF-469B-BAA3-CB103F8EA80B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TelegramListener.Core", "src\Nocr.TelegramListener.Core\Nocr.TelegramListener.Core.csproj", "{3E87693C-78DF-469B-BAA3-CB103F8EA80B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TextMatcher.AppServices", "src\Nocr.TextMatcher.AppServices\Nocr.TextMatcher.AppServices.csproj", "{5CCB085C-860A-4C4C-907C-10183ABCEA9B}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TelegramListener.AppServices", "src\Nocr.TelegramListener.AppServices\Nocr.TelegramListener.AppServices.csproj", "{5CCB085C-860A-4C4C-907C-10183ABCEA9B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TextMatcher.Host", "src\Nocr.TextMatcher.Host\Nocr.TextMatcher.Host.csproj", "{58D5C9FD-75A9-4FFB-9FBD-BE8E9FCE3016}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Nocr.TelegramListener.Host", "src\Nocr.TelegramListener.Host\Nocr.TelegramListener.Host.csproj", "{58D5C9FD-75A9-4FFB-9FBD-BE8E9FCE3016}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/Nocr.TextMatcher.AppServices/Nocr.TextMatcher.AppServices.csproj b/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj similarity index 66% rename from src/Nocr.TextMatcher.AppServices/Nocr.TextMatcher.AppServices.csproj rename to src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj index 6c91e3a..d7f9890 100644 --- a/src/Nocr.TextMatcher.AppServices/Nocr.TextMatcher.AppServices.csproj +++ b/src/Nocr.TelegramListener.AppServices/Nocr.TelegramListener.AppServices.csproj @@ -5,7 +5,7 @@ - + diff --git a/src/Nocr.TextMatcher.AppServices/ServiceCollectionExtensions.cs b/src/Nocr.TelegramListener.AppServices/ServiceCollectionExtensions.cs similarity index 100% rename from src/Nocr.TextMatcher.AppServices/ServiceCollectionExtensions.cs rename to src/Nocr.TelegramListener.AppServices/ServiceCollectionExtensions.cs diff --git a/src/Nocr.TextMatcher.Core/Dates/DefaultCurrentDateProvider.cs b/src/Nocr.TelegramListener.Core/Dates/DefaultCurrentDateProvider.cs similarity index 75% rename from src/Nocr.TextMatcher.Core/Dates/DefaultCurrentDateProvider.cs rename to src/Nocr.TelegramListener.Core/Dates/DefaultCurrentDateProvider.cs index ec7f18e..00cde13 100644 --- a/src/Nocr.TextMatcher.Core/Dates/DefaultCurrentDateProvider.cs +++ b/src/Nocr.TelegramListener.Core/Dates/DefaultCurrentDateProvider.cs @@ -1,4 +1,4 @@ -namespace Nocr.TextMatcher.Core.Dates; +namespace Nocr.TelegramListener.Core.Dates; public sealed class DefaultCurrentDateProvider : ICurrentDateProvider { diff --git a/src/Nocr.TextMatcher.Core/Dates/ICurrentDateProvider.cs b/src/Nocr.TelegramListener.Core/Dates/ICurrentDateProvider.cs similarity index 65% rename from src/Nocr.TextMatcher.Core/Dates/ICurrentDateProvider.cs rename to src/Nocr.TelegramListener.Core/Dates/ICurrentDateProvider.cs index 9741478..525a9dc 100644 --- a/src/Nocr.TextMatcher.Core/Dates/ICurrentDateProvider.cs +++ b/src/Nocr.TelegramListener.Core/Dates/ICurrentDateProvider.cs @@ -1,4 +1,4 @@ -namespace Nocr.TextMatcher.Core.Dates; +namespace Nocr.TelegramListener.Core.Dates; public interface ICurrentDateProvider { diff --git a/src/Nocr.TextMatcher.Core/Nocr.TextMatcher.Core.csproj b/src/Nocr.TelegramListener.Core/Nocr.TelegramListener.Core.csproj similarity index 100% rename from src/Nocr.TextMatcher.Core/Nocr.TextMatcher.Core.csproj rename to src/Nocr.TelegramListener.Core/Nocr.TelegramListener.Core.csproj diff --git a/src/Nocr.TelegramListener.Host/Dockerfile b/src/Nocr.TelegramListener.Host/Dockerfile new file mode 100644 index 0000000..23941a3 --- /dev/null +++ b/src/Nocr.TelegramListener.Host/Dockerfile @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +WORKDIR /src +COPY . . + +RUN dotnet restore "src/Nocr.TelegramListener.Host/Nocr.TelegramListener.Host.csproj" +WORKDIR "/src/src/Nocr.TelegramListener.Host" +RUN dotnet build "Nocr.TelegramListener.Host.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "Nocr.TelegramListener.Host.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "Nocr.TelegramListener.Host.dll"] diff --git a/src/Nocr.TextMatcher.Host/Infrastructure/HostBuilderFactory.cs b/src/Nocr.TelegramListener.Host/Infrastructure/HostBuilderFactory.cs similarity index 94% rename from src/Nocr.TextMatcher.Host/Infrastructure/HostBuilderFactory.cs rename to src/Nocr.TelegramListener.Host/Infrastructure/HostBuilderFactory.cs index 60cd770..b24882f 100644 --- a/src/Nocr.TextMatcher.Host/Infrastructure/HostBuilderFactory.cs +++ b/src/Nocr.TelegramListener.Host/Infrastructure/HostBuilderFactory.cs @@ -1,6 +1,6 @@ using Serilog; -namespace Nocr.TextMatcher.Host.Infrastructure; +namespace Nocr.TelegramListener.Host.Infrastructure; public class HostBuilderFactory where TStartup : class { diff --git a/src/Nocr.TextMatcher.Host/Infrastructure/Startup.cs b/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs similarity index 83% rename from src/Nocr.TextMatcher.Host/Infrastructure/Startup.cs rename to src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs index 5c4d568..c37669d 100644 --- a/src/Nocr.TextMatcher.Host/Infrastructure/Startup.cs +++ b/src/Nocr.TelegramListener.Host/Infrastructure/Startup.cs @@ -1,7 +1,7 @@ +using Nocr.TelegramListener.Core.Dates; using Nocr.TextMatcher.AppServices; -using Nocr.TextMatcher.Core.Dates; -namespace Nocr.TextMatcher.Host.Infrastructure; +namespace Nocr.TelegramListener.Host.Infrastructure; public class Startup { diff --git a/src/Nocr.TextMatcher.Host/Nocr.TextMatcher.Host.csproj b/src/Nocr.TelegramListener.Host/Nocr.TelegramListener.Host.csproj similarity index 78% rename from src/Nocr.TextMatcher.Host/Nocr.TextMatcher.Host.csproj rename to src/Nocr.TelegramListener.Host/Nocr.TelegramListener.Host.csproj index dc47084..9cafcba 100644 --- a/src/Nocr.TextMatcher.Host/Nocr.TextMatcher.Host.csproj +++ b/src/Nocr.TelegramListener.Host/Nocr.TelegramListener.Host.csproj @@ -9,7 +9,7 @@ - + diff --git a/src/Nocr.TextMatcher.Host/Program.cs b/src/Nocr.TelegramListener.Host/Program.cs similarity index 69% rename from src/Nocr.TextMatcher.Host/Program.cs rename to src/Nocr.TelegramListener.Host/Program.cs index 5281a29..b5dd8ef 100644 --- a/src/Nocr.TextMatcher.Host/Program.cs +++ b/src/Nocr.TelegramListener.Host/Program.cs @@ -1,4 +1,4 @@ -using Nocr.TextMatcher.Host.Infrastructure; +using Nocr.TelegramListener.Host.Infrastructure; var host = new HostBuilderFactory() .CreateHostBuilder(args) diff --git a/src/Nocr.TextMatcher.Host/appsettings.Development.json b/src/Nocr.TelegramListener.Host/appsettings.Development.json similarity index 100% rename from src/Nocr.TextMatcher.Host/appsettings.Development.json rename to src/Nocr.TelegramListener.Host/appsettings.Development.json diff --git a/src/Nocr.TextMatcher.Host/appsettings.Production.json b/src/Nocr.TelegramListener.Host/appsettings.Production.json similarity index 100% rename from src/Nocr.TextMatcher.Host/appsettings.Production.json rename to src/Nocr.TelegramListener.Host/appsettings.Production.json diff --git a/src/Nocr.TextMatcher.Host/appsettings.json b/src/Nocr.TelegramListener.Host/appsettings.json similarity index 100% rename from src/Nocr.TextMatcher.Host/appsettings.json rename to src/Nocr.TelegramListener.Host/appsettings.json diff --git a/src/Nocr.TextMatcher.Host/Dockerfile b/src/Nocr.TextMatcher.Host/Dockerfile deleted file mode 100644 index 35c2833..0000000 --- a/src/Nocr.TextMatcher.Host/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build -WORKDIR /src -COPY . . - -RUN dotnet restore "src/Nocr.TextMatcher.Host/Nocr.TextMatcher.Host.csproj" -WORKDIR "/src/src/Nocr.TextMatcher.Host" -RUN dotnet build "Nocr.TextMatcher.Host.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "Nocr.TextMatcher.Host.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "Nocr.TextMatcher.Host.dll"]