diff --git a/NetworkResurrector.Agent/Dockerfile b/NetworkResurrector.Agent/Dockerfile deleted file mode 100644 index c532790..0000000 --- a/NetworkResurrector.Agent/Dockerfile +++ /dev/null @@ -1,34 +0,0 @@ -#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. - -FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base -WORKDIR /app -EXPOSE 80 - -FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build -WORKDIR /src -COPY dependencies.props . -COPY Directory.Build.props . -COPY NuGet.config . -COPY ["NetworkResurrector.Agent/NetworkResurrector.Agent.csproj", "NetworkResurrector.Agent/"] -COPY ["NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj", "NetworkResurrector.Agent.Application/"] -COPY ["NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj", "NetworkResurrector.Agent.Domain/"] -COPY ["NetworkResurrector.Agent.Domain.Data/NetworkResurrector.Agent.Domain.Data.csproj", "NetworkResurrector.Agent.Domain.Data/"] -RUN dotnet restore "NetworkResurrector.Agent/NetworkResurrector.Agent.csproj" -COPY . . -WORKDIR "/src/NetworkResurrector.Agent" -RUN dotnet build "NetworkResurrector.Agent.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "NetworkResurrector.Agent.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . - -ENV urls="http://*:80" -ENV ConnectionStrings__DatabaseConnection="***REMOVED***" - -#Workaround to lower the TLS level in container for old sql server version -RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf - -ENTRYPOINT ["dotnet", "NetworkResurrector.Agent.dll", "--console"] \ No newline at end of file diff --git a/NetworkResurrector.Domain/Services/IParamProvider.cs b/NetworkResurrector.Domain/Services/IParamProvider.cs deleted file mode 100644 index 2d54d69..0000000 --- a/NetworkResurrector.Domain/Services/IParamProvider.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace NetworkResurrector.Domain.Services -{ - public interface IParamProvider - { - } -} diff --git a/NetworkResurrector.sln b/NetworkResurrector.sln index 4026593..6fa5fd3 100644 --- a/NetworkResurrector.sln +++ b/NetworkResurrector.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.30002.166 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api", "NetworkResurrector.Api\NetworkResurrector.Api.csproj", "{F6600491-5D79-4548-8745-59D9D337D3DB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server", "src\server\NetworkResurrector.Server\NetworkResurrector.Server.csproj", "{F6600491-5D79-4548-8745-59D9D337D3DB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{FDDE879C-E0A3-4BF1-945F-7FEA324C8EBA}" ProjectSection(SolutionItems) = preProject @@ -17,29 +17,29 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ReleaseNotes.xml = ReleaseNotes.xml EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Application", "NetworkResurrector.Application\NetworkResurrector.Application.csproj", "{15D65D65-CC96-45DE-8590-AF9132889D98}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Application", "src\server\NetworkResurrector.Server.Application\NetworkResurrector.Server.Application.csproj", "{15D65D65-CC96-45DE-8590-AF9132889D98}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Domain", "NetworkResurrector.Domain\NetworkResurrector.Domain.csproj", "{EC78E88E-22DC-4FFD-881E-DEECF0D2494E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Domain", "src\server\NetworkResurrector.Server.Domain\NetworkResurrector.Server.Domain.csproj", "{EC78E88E-22DC-4FFD-881E-DEECF0D2494E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Abstractions", "NetworkResurrector.Abstractions\NetworkResurrector.Abstractions.csproj", "{B7408385-ED73-4ED3-9654-9AFF8CDFDA8D}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Server.Abstractions", "src\server\NetworkResurrector.Server.Abstractions\NetworkResurrector.Server.Abstractions.csproj", "{B7408385-ED73-4ED3-9654-9AFF8CDFDA8D}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Nikeee", "NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj", "{59049C2B-CEFB-456D-B3D5-D2CF5325AEEB}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Nikeee", "src\server\NetworkResurrector.WakeOnLan.Nikeee\NetworkResurrector.WakeOnLan.Nikeee.csproj", "{59049C2B-CEFB-456D-B3D5-D2CF5325AEEB}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Inhouse", "NetworkResurrector.WakeOnLan.Inhouse\NetworkResurrector.WakeOnLan.Inhouse.csproj", "{8A593A37-7ECA-4EDD-A0A7-86CA88ECC1BD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.WakeOnLan.Inhouse", "src\server\NetworkResurrector.WakeOnLan.Inhouse\NetworkResurrector.WakeOnLan.Inhouse.csproj", "{8A593A37-7ECA-4EDD-A0A7-86CA88ECC1BD}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B0C5F0C1-0BF8-4651-AAFC-BE01F516D7B8}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{6889D39C-D8DA-4B99-AFC1-F0B6355E73C0}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "server", "server", "{6889D39C-D8DA-4B99-AFC1-F0B6355E73C0}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "agent", "agent", "{43C78941-52E6-4AB8-9170-CC7C006E4784}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{43C78941-52E6-4AB8-9170-CC7C006E4784}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Agent", "NetworkResurrector.Agent\NetworkResurrector.Agent.csproj", "{E10CEE53-8167-446F-BFF3-B80725BB6C90}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api", "src\api\NetworkResurrector.Api\NetworkResurrector.Api.csproj", "{E10CEE53-8167-446F-BFF3-B80725BB6C90}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Agent.Application", "NetworkResurrector.Agent.Application\NetworkResurrector.Agent.Application.csproj", "{EE31B126-12EC-46B3-8FB4-AD5BCF14C029}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api.Application", "src\api\NetworkResurrector.Api.Application\NetworkResurrector.Api.Application.csproj", "{EE31B126-12EC-46B3-8FB4-AD5BCF14C029}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Agent.Domain", "NetworkResurrector.Agent.Domain\NetworkResurrector.Agent.Domain.csproj", "{885D5625-028A-4B35-8C89-7EF718BC6E34}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api.Domain", "src\api\NetworkResurrector.Api.Domain\NetworkResurrector.Api.Domain.csproj", "{885D5625-028A-4B35-8C89-7EF718BC6E34}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Agent.Domain.Data", "NetworkResurrector.Agent.Domain.Data\NetworkResurrector.Agent.Domain.Data.csproj", "{509767A7-D11C-4143-8D45-01E62DFC2C74}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NetworkResurrector.Api.Domain.Data", "src\api\NetworkResurrector.Api.Domain.Data\NetworkResurrector.Api.Domain.Data.csproj", "{509767A7-D11C-4143-8D45-01E62DFC2C74}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Notes.txt b/Notes.txt index babf6dd..2383d70 100644 --- a/Notes.txt +++ b/Notes.txt @@ -3,7 +3,7 @@ Publish: dotnet publish --configuration Release --runtime win7-x64 Create windows service: -sc create NetworkResurrector.Api binPath= "" +sc create NetworkResurrector.Server binPath= "" ####################################################################################################################################################### Resources: https://github.com/nikeee/wake-on-lan @@ -21,7 +21,7 @@ Agent: Create image: --from solution folder: -docker image build -t "network-resurrector-agent:1.0.0" -f "NetworkResurrector.Agent/Dockerfile" . +docker image build -t "network-resurrector-agent:1.0.0" -f "NetworkResurrector.Api/Dockerfile" . Run image: docker run -p 5053:80 -it network-resurrector-agent:1.0.0 diff --git a/NetworkResurrector.Agent.Application/DependencyInjectionExtensions.cs b/src/api/NetworkResurrector.Api.Application/DependencyInjectionExtensions.cs similarity index 82% rename from NetworkResurrector.Agent.Application/DependencyInjectionExtensions.cs rename to src/api/NetworkResurrector.Api.Application/DependencyInjectionExtensions.cs index 2d33f39..8cb9d84 100644 --- a/NetworkResurrector.Agent.Application/DependencyInjectionExtensions.cs +++ b/src/api/NetworkResurrector.Api.Application/DependencyInjectionExtensions.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.DependencyInjection; -namespace NetworkResurrector.Agent.Application +namespace NetworkResurrector.Api.Application { public static class DependencyInjectionExtensions { diff --git a/NetworkResurrector.Agent.Application/Mappings/MappingProfile.cs b/src/api/NetworkResurrector.Api.Application/Mappings/MappingProfile.cs similarity index 54% rename from NetworkResurrector.Agent.Application/Mappings/MappingProfile.cs rename to src/api/NetworkResurrector.Api.Application/Mappings/MappingProfile.cs index 84b7586..673d5ff 100644 --- a/NetworkResurrector.Agent.Application/Mappings/MappingProfile.cs +++ b/src/api/NetworkResurrector.Api.Application/Mappings/MappingProfile.cs @@ -1,8 +1,8 @@ using AutoMapper; -using NetworkResurrector.Agent.Application.Queries; -using NetworkResurrector.Agent.Domain.Entities; +using NetworkResurrector.Api.Application.Queries; +using NetworkResurrector.Api.Domain.Entities; -namespace NetworkResurrector.Agent.Application.Mappings +namespace NetworkResurrector.Api.Application.Mappings { public class MappingProfile : Profile { diff --git a/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj b/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj similarity index 85% rename from NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj rename to src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj index 38e9483..2407059 100644 --- a/NetworkResurrector.Agent.Application/NetworkResurrector.Agent.Application.csproj +++ b/src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -14,6 +14,6 @@ - + diff --git a/NetworkResurrector.Agent.Application/Queries/GetMachines.cs b/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs similarity index 92% rename from NetworkResurrector.Agent.Application/Queries/GetMachines.cs rename to src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs index e453685..a85be62 100644 --- a/NetworkResurrector.Agent.Application/Queries/GetMachines.cs +++ b/src/api/NetworkResurrector.Api.Application/Queries/GetMachines.cs @@ -1,11 +1,11 @@ using AutoMapper; using MediatR; using NDB.Application.DataContracts; -using NetworkResurrector.Agent.Domain.Repositories; +using NetworkResurrector.Api.Domain.Repositories; using System.Threading; using System.Threading.Tasks; -namespace NetworkResurrector.Agent.Application.Queries +namespace NetworkResurrector.Api.Application.Queries { public class GetMachines { diff --git a/NetworkResurrector.Agent.Domain.Data/DbContexts/AgentDbContext.cs b/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs similarity index 78% rename from NetworkResurrector.Agent.Domain.Data/DbContexts/AgentDbContext.cs rename to src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs index 8acca05..60669c1 100644 --- a/NetworkResurrector.Agent.Domain.Data/DbContexts/AgentDbContext.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/DbContexts/AgentDbContext.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; -using NetworkResurrector.Agent.Domain.Data.EntityTypeConfiguration; -using NetworkResurrector.Agent.Domain.Entities; +using NetworkResurrector.Api.Domain.Data.EntityTypeConfiguration; +using NetworkResurrector.Api.Domain.Entities; -namespace NetworkResurrector.Agent.Domain.Data.DbContexts +namespace NetworkResurrector.Api.Domain.Data.DbContexts { public class AgentDbContext : DbContext { diff --git a/NetworkResurrector.Agent.Domain.Data/DependencyInjectionExtensions.cs b/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs similarity index 78% rename from NetworkResurrector.Agent.Domain.Data/DependencyInjectionExtensions.cs rename to src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs index f98a0e8..00380bf 100644 --- a/NetworkResurrector.Agent.Domain.Data/DependencyInjectionExtensions.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/DependencyInjectionExtensions.cs @@ -1,11 +1,11 @@ using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using NetworkResurrector.Agent.Domain.Data.DbContexts; -using NetworkResurrector.Agent.Domain.Data.Repositories; -using NetworkResurrector.Agent.Domain.Repositories; +using NetworkResurrector.Api.Domain.Data.DbContexts; +using NetworkResurrector.Api.Domain.Data.Repositories; +using NetworkResurrector.Api.Domain.Repositories; -namespace NetworkResurrector.Agent.Domain.Data +namespace NetworkResurrector.Api.Domain.Data { public static class DependencyInjectionExtensions { diff --git a/NetworkResurrector.Agent.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs b/src/api/NetworkResurrector.Api.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs similarity index 77% rename from NetworkResurrector.Agent.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs rename to src/api/NetworkResurrector.Api.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs index a0d9264..3c5b9e1 100644 --- a/NetworkResurrector.Agent.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/EntityTypeConfiguration/MachineConfiguration.cs @@ -1,8 +1,8 @@ using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Metadata.Builders; -using NetworkResurrector.Agent.Domain.Entities; +using NetworkResurrector.Api.Domain.Entities; -namespace NetworkResurrector.Agent.Domain.Data.EntityTypeConfiguration +namespace NetworkResurrector.Api.Domain.Data.EntityTypeConfiguration { class MachineConfiguration : IEntityTypeConfiguration { diff --git a/NetworkResurrector.Agent.Domain.Data/NetworkResurrector.Agent.Domain.Data.csproj b/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj similarity index 74% rename from NetworkResurrector.Agent.Domain.Data/NetworkResurrector.Agent.Domain.Data.csproj rename to src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj index fec7df8..95c5f5c 100644 --- a/NetworkResurrector.Agent.Domain.Data/NetworkResurrector.Agent.Domain.Data.csproj +++ b/src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj @@ -9,7 +9,7 @@ - + diff --git a/NetworkResurrector.Agent.Domain.Data/Repositories/AgentRepository.cs b/src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs similarity index 66% rename from NetworkResurrector.Agent.Domain.Data/Repositories/AgentRepository.cs rename to src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs index f54ebd9..ec48da7 100644 --- a/NetworkResurrector.Agent.Domain.Data/Repositories/AgentRepository.cs +++ b/src/api/NetworkResurrector.Api.Domain.Data/Repositories/AgentRepository.cs @@ -1,10 +1,10 @@ using Microsoft.EntityFrameworkCore; -using NetworkResurrector.Agent.Domain.Data.DbContexts; -using NetworkResurrector.Agent.Domain.Entities; -using NetworkResurrector.Agent.Domain.Repositories; +using NetworkResurrector.Api.Domain.Data.DbContexts; +using NetworkResurrector.Api.Domain.Entities; +using NetworkResurrector.Api.Domain.Repositories; using System.Threading.Tasks; -namespace NetworkResurrector.Agent.Domain.Data.Repositories +namespace NetworkResurrector.Api.Domain.Data.Repositories { class AgentRepository : IAgentRepository { diff --git a/NetworkResurrector.Agent.Domain.Data/Scripts/001.Machine table.sql b/src/api/NetworkResurrector.Api.Domain.Data/Scripts/001.Machine table.sql similarity index 100% rename from NetworkResurrector.Agent.Domain.Data/Scripts/001.Machine table.sql rename to src/api/NetworkResurrector.Api.Domain.Data/Scripts/001.Machine table.sql diff --git a/NetworkResurrector.Agent.Domain/Entities/Machine.cs b/src/api/NetworkResurrector.Api.Domain/Entities/Machine.cs similarity index 85% rename from NetworkResurrector.Agent.Domain/Entities/Machine.cs rename to src/api/NetworkResurrector.Api.Domain/Entities/Machine.cs index a0e3afa..29e4fa7 100644 --- a/NetworkResurrector.Agent.Domain/Entities/Machine.cs +++ b/src/api/NetworkResurrector.Api.Domain/Entities/Machine.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Agent.Domain.Entities +namespace NetworkResurrector.Api.Domain.Entities { public class Machine { diff --git a/NetworkResurrector.Abstractions/NetworkResurrector.Abstractions.csproj b/src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj similarity index 100% rename from NetworkResurrector.Abstractions/NetworkResurrector.Abstractions.csproj rename to src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj diff --git a/NetworkResurrector.Agent.Domain/Repositories/IAgentRepository.cs b/src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs similarity index 53% rename from NetworkResurrector.Agent.Domain/Repositories/IAgentRepository.cs rename to src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs index 804c4a7..b4fa21d 100644 --- a/NetworkResurrector.Agent.Domain/Repositories/IAgentRepository.cs +++ b/src/api/NetworkResurrector.Api.Domain/Repositories/IAgentRepository.cs @@ -1,7 +1,7 @@ -using NetworkResurrector.Agent.Domain.Entities; +using NetworkResurrector.Api.Domain.Entities; using System.Threading.Tasks; -namespace NetworkResurrector.Agent.Domain.Repositories +namespace NetworkResurrector.Api.Domain.Repositories { public interface IAgentRepository { diff --git a/NetworkResurrector.Agent/Controllers/ResurrectorAgentController.cs b/src/api/NetworkResurrector.Api/Controllers/ResurrectorAgentController.cs similarity index 85% rename from NetworkResurrector.Agent/Controllers/ResurrectorAgentController.cs rename to src/api/NetworkResurrector.Api/Controllers/ResurrectorAgentController.cs index c38b2b3..039531c 100644 --- a/NetworkResurrector.Agent/Controllers/ResurrectorAgentController.cs +++ b/src/api/NetworkResurrector.Api/Controllers/ResurrectorAgentController.cs @@ -1,9 +1,9 @@ using MediatR; using Microsoft.AspNetCore.Mvc; -using NetworkResurrector.Agent.Application.Queries; +using NetworkResurrector.Api.Application.Queries; using System.Threading.Tasks; -namespace NetworkResurrector.Agent.Controllers +namespace NetworkResurrector.Api.Controllers { [ApiController] [Route("resurrector-agent")] diff --git a/src/api/NetworkResurrector.Api/Dockerfile b/src/api/NetworkResurrector.Api/Dockerfile new file mode 100644 index 0000000..792ed50 --- /dev/null +++ b/src/api/NetworkResurrector.Api/Dockerfile @@ -0,0 +1,34 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base +WORKDIR /app +EXPOSE 80 + +FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build +WORKDIR /src +COPY dependencies.props . +COPY Directory.Build.props . +COPY NuGet.config . +COPY ["src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj", "NetworkResurrector.Api/"] +COPY ["src/api/NetworkResurrector.Api.Application/NetworkResurrector.Api.Application.csproj", "NetworkResurrector.Api.Application/"] +COPY ["src/api/NetworkResurrector.Api.Domain/NetworkResurrector.Api.Domain.csproj", "NetworkResurrector.Api.Domain/"] +COPY ["src/api/NetworkResurrector.Api.Domain.Data/NetworkResurrector.Api.Domain.Data.csproj", "NetworkResurrector.Api.Domain.Data/"] +RUN dotnet restore "NetworkResurrector.Api/NetworkResurrector.Api.csproj" +COPY . . +WORKDIR "/src/NetworkResurrector.Api" +RUN dotnet build "NetworkResurrector.Api.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "NetworkResurrector.Api.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . + +ENV urls="http://*:80" +ENV ConnectionStrings__DatabaseConnection="***REMOVED***" + +#Workaround to lower the TLS level in container for old sql server version +RUN sed -i 's/TLSv1.2/TLSv1.0/g' /etc/ssl/openssl.cnf + +ENTRYPOINT ["dotnet", "NetworkResurrector.Api.dll", "--console"] \ No newline at end of file diff --git a/NetworkResurrector.Api/NetworkResurrector.Api.csproj b/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj similarity index 84% rename from NetworkResurrector.Api/NetworkResurrector.Api.csproj rename to src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj index 97fef7e..eadafe9 100644 --- a/NetworkResurrector.Api/NetworkResurrector.Api.csproj +++ b/src/api/NetworkResurrector.Api/NetworkResurrector.Api.csproj @@ -2,6 +2,7 @@ netcoreapp3.1 + Linux @@ -22,9 +23,8 @@ - - - + + diff --git a/NetworkResurrector.Agent/Program.cs b/src/api/NetworkResurrector.Api/Program.cs similarity index 98% rename from NetworkResurrector.Agent/Program.cs rename to src/api/NetworkResurrector.Api/Program.cs index 066127f..797c8b9 100644 --- a/NetworkResurrector.Agent/Program.cs +++ b/src/api/NetworkResurrector.Api/Program.cs @@ -10,7 +10,7 @@ using System.Diagnostics; using System.IO; using System.Linq; -namespace NetworkResurrector.Agent +namespace NetworkResurrector.Api { public class Program { diff --git a/NetworkResurrector.Api/Properties/launchSettings.json b/src/api/NetworkResurrector.Api/Properties/launchSettings.json similarity index 100% rename from NetworkResurrector.Api/Properties/launchSettings.json rename to src/api/NetworkResurrector.Api/Properties/launchSettings.json diff --git a/NetworkResurrector.Agent/Startup.cs b/src/api/NetworkResurrector.Api/Startup.cs similarity index 95% rename from NetworkResurrector.Agent/Startup.cs rename to src/api/NetworkResurrector.Api/Startup.cs index 48e088e..5e4a700 100644 --- a/NetworkResurrector.Agent/Startup.cs +++ b/src/api/NetworkResurrector.Api/Startup.cs @@ -8,12 +8,12 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using NDB.Extensions.Swagger; using NDB.Security.Authentication.Identity; -using NetworkResurrector.Agent.Application; -using NetworkResurrector.Agent.Domain.Data; +using NetworkResurrector.Api.Application; +using NetworkResurrector.Api.Domain.Data; using Newtonsoft.Json; using System.Reflection; -namespace NetworkResurrector.Agent +namespace NetworkResurrector.Api { public class Startup { diff --git a/NetworkResurrector.Agent/appsettings.Development.json b/src/api/NetworkResurrector.Api/appsettings.Development.json similarity index 100% rename from NetworkResurrector.Agent/appsettings.Development.json rename to src/api/NetworkResurrector.Api/appsettings.Development.json diff --git a/NetworkResurrector.Agent/appsettings.json b/src/api/NetworkResurrector.Api/appsettings.json similarity index 100% rename from NetworkResurrector.Agent/appsettings.json rename to src/api/NetworkResurrector.Api/appsettings.json diff --git a/NetworkResurrector.Abstractions/INotifier.cs b/src/server/NetworkResurrector.Server.Abstractions/INotifier.cs similarity index 71% rename from NetworkResurrector.Abstractions/INotifier.cs rename to src/server/NetworkResurrector.Server.Abstractions/INotifier.cs index 04d1f9e..b484094 100644 --- a/NetworkResurrector.Abstractions/INotifier.cs +++ b/src/server/NetworkResurrector.Server.Abstractions/INotifier.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Abstractions +namespace NetworkResurrector.Server.Abstractions { public interface INotifier { diff --git a/NetworkResurrector.Abstractions/IWakeOnLanService.cs b/src/server/NetworkResurrector.Server.Abstractions/IWakeOnLanService.cs similarity index 76% rename from NetworkResurrector.Abstractions/IWakeOnLanService.cs rename to src/server/NetworkResurrector.Server.Abstractions/IWakeOnLanService.cs index 3901008..24f4fc7 100644 --- a/NetworkResurrector.Abstractions/IWakeOnLanService.cs +++ b/src/server/NetworkResurrector.Server.Abstractions/IWakeOnLanService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace NetworkResurrector.Abstractions +namespace NetworkResurrector.Server.Abstractions { public interface IWakeOnLanService { diff --git a/NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj b/src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj similarity index 100% rename from NetworkResurrector.Agent.Domain/NetworkResurrector.Agent.Domain.csproj rename to src/server/NetworkResurrector.Server.Abstractions/NetworkResurrector.Server.Abstractions.csproj diff --git a/NetworkResurrector.Application/CommandHandlers/PingMachineHandler.cs b/src/server/NetworkResurrector.Server.Application/CommandHandlers/PingMachineHandler.cs similarity index 86% rename from NetworkResurrector.Application/CommandHandlers/PingMachineHandler.cs rename to src/server/NetworkResurrector.Server.Application/CommandHandlers/PingMachineHandler.cs index c440001..a53f7ad 100644 --- a/NetworkResurrector.Application/CommandHandlers/PingMachineHandler.cs +++ b/src/server/NetworkResurrector.Server.Application/CommandHandlers/PingMachineHandler.cs @@ -1,13 +1,13 @@ using MediatR; using Microsoft.Extensions.Logging; -using NetworkResurrector.Application.Commands; -using NetworkResurrector.Application.Events; -using NetworkResurrector.Application.Services; +using NetworkResurrector.Server.Application.Commands; +using NetworkResurrector.Server.Application.Events; +using NetworkResurrector.Server.Application.Services; using System; using System.Threading; using System.Threading.Tasks; -namespace NetworkResurrector.Application.CommandHandlers +namespace NetworkResurrector.Server.Application.CommandHandlers { public class PingMachineHandler : IRequestHandler { diff --git a/NetworkResurrector.Application/CommandHandlers/ShutdownMachineHandler.cs b/src/server/NetworkResurrector.Server.Application/CommandHandlers/ShutdownMachineHandler.cs similarity index 87% rename from NetworkResurrector.Application/CommandHandlers/ShutdownMachineHandler.cs rename to src/server/NetworkResurrector.Server.Application/CommandHandlers/ShutdownMachineHandler.cs index 9225784..6b07a5c 100644 --- a/NetworkResurrector.Application/CommandHandlers/ShutdownMachineHandler.cs +++ b/src/server/NetworkResurrector.Server.Application/CommandHandlers/ShutdownMachineHandler.cs @@ -1,13 +1,13 @@ using MediatR; using Microsoft.Extensions.Logging; -using NetworkResurrector.Application.Commands; -using NetworkResurrector.Application.Events; -using NetworkResurrector.Application.Services; +using NetworkResurrector.Server.Application.Commands; +using NetworkResurrector.Server.Application.Events; +using NetworkResurrector.Server.Application.Services; using System; using System.Threading; using System.Threading.Tasks; -namespace NetworkResurrector.Application.CommandHandlers +namespace NetworkResurrector.Server.Application.CommandHandlers { public class ShutdownMachineHandler : IRequestHandler { diff --git a/NetworkResurrector.Application/CommandHandlers/WakeMachineHandler.cs b/src/server/NetworkResurrector.Server.Application/CommandHandlers/WakeMachineHandler.cs similarity index 84% rename from NetworkResurrector.Application/CommandHandlers/WakeMachineHandler.cs rename to src/server/NetworkResurrector.Server.Application/CommandHandlers/WakeMachineHandler.cs index 829bb6a..700c4c3 100644 --- a/NetworkResurrector.Application/CommandHandlers/WakeMachineHandler.cs +++ b/src/server/NetworkResurrector.Server.Application/CommandHandlers/WakeMachineHandler.cs @@ -1,13 +1,13 @@ using MediatR; using Microsoft.Extensions.Logging; -using NetworkResurrector.Abstractions; -using NetworkResurrector.Application.Commands; -using NetworkResurrector.Application.Events; +using NetworkResurrector.Server.Abstractions; +using NetworkResurrector.Server.Application.Commands; +using NetworkResurrector.Server.Application.Events; using System; using System.Threading; using System.Threading.Tasks; -namespace NetworkResurrector.Application.CommandHandlers +namespace NetworkResurrector.Server.Application.CommandHandlers { public class WakeMachineHandler : IRequestHandler { diff --git a/NetworkResurrector.Application/Commands/PingMachine.cs b/src/server/NetworkResurrector.Server.Application/Commands/PingMachine.cs similarity index 77% rename from NetworkResurrector.Application/Commands/PingMachine.cs rename to src/server/NetworkResurrector.Server.Application/Commands/PingMachine.cs index b5c9a08..c93614a 100644 --- a/NetworkResurrector.Application/Commands/PingMachine.cs +++ b/src/server/NetworkResurrector.Server.Application/Commands/PingMachine.cs @@ -1,8 +1,8 @@ using NDB.Application.DataContracts; -using NetworkResurrector.Application.Events; +using NetworkResurrector.Server.Application.Events; using System; -namespace NetworkResurrector.Application.Commands +namespace NetworkResurrector.Server.Application.Commands { public class PingMachine : Command { diff --git a/NetworkResurrector.Application/Commands/ShutdownMachine.cs b/src/server/NetworkResurrector.Server.Application/Commands/ShutdownMachine.cs similarity index 78% rename from NetworkResurrector.Application/Commands/ShutdownMachine.cs rename to src/server/NetworkResurrector.Server.Application/Commands/ShutdownMachine.cs index 078ec2c..bf7cb11 100644 --- a/NetworkResurrector.Application/Commands/ShutdownMachine.cs +++ b/src/server/NetworkResurrector.Server.Application/Commands/ShutdownMachine.cs @@ -1,8 +1,8 @@ using NDB.Application.DataContracts; -using NetworkResurrector.Application.Events; +using NetworkResurrector.Server.Application.Events; using System; -namespace NetworkResurrector.Application.Commands +namespace NetworkResurrector.Server.Application.Commands { public class ShutdownMachine : Command { diff --git a/NetworkResurrector.Application/Commands/WakeMachine.cs b/src/server/NetworkResurrector.Server.Application/Commands/WakeMachine.cs similarity index 75% rename from NetworkResurrector.Application/Commands/WakeMachine.cs rename to src/server/NetworkResurrector.Server.Application/Commands/WakeMachine.cs index 375a6f8..9e3f250 100644 --- a/NetworkResurrector.Application/Commands/WakeMachine.cs +++ b/src/server/NetworkResurrector.Server.Application/Commands/WakeMachine.cs @@ -1,8 +1,8 @@ using NDB.Application.DataContracts; -using NetworkResurrector.Application.Events; +using NetworkResurrector.Server.Application.Events; using System; -namespace NetworkResurrector.Application.Commands +namespace NetworkResurrector.Server.Application.Commands { public class WakeMachine : Command { diff --git a/NetworkResurrector.Application/DependencyInjectionExtensions.cs b/src/server/NetworkResurrector.Server.Application/DependencyInjectionExtensions.cs similarity index 77% rename from NetworkResurrector.Application/DependencyInjectionExtensions.cs rename to src/server/NetworkResurrector.Server.Application/DependencyInjectionExtensions.cs index 5b63694..09201a1 100644 --- a/NetworkResurrector.Application/DependencyInjectionExtensions.cs +++ b/src/server/NetworkResurrector.Server.Application/DependencyInjectionExtensions.cs @@ -1,9 +1,9 @@ using Microsoft.Extensions.DependencyInjection; -using NetworkResurrector.Application.Services; -using NetworkResurrector.Application.Stores; -using NetworkResurrector.Domain.Services; +using NetworkResurrector.Server.Application.Services; +using NetworkResurrector.Server.Application.Stores; +using NetworkResurrector.Server.Domain.Services; -namespace NetworkResurrector.Application +namespace NetworkResurrector.Server.Application { public static class DependencyInjectionExtensions { diff --git a/NetworkResurrector.Application/Events/MachinePinged.cs b/src/server/NetworkResurrector.Server.Application/Events/MachinePinged.cs similarity index 81% rename from NetworkResurrector.Application/Events/MachinePinged.cs rename to src/server/NetworkResurrector.Server.Application/Events/MachinePinged.cs index 5acd12f..a33683b 100644 --- a/NetworkResurrector.Application/Events/MachinePinged.cs +++ b/src/server/NetworkResurrector.Server.Application/Events/MachinePinged.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Application.Events +namespace NetworkResurrector.Server.Application.Events { public class MachinePinged { diff --git a/NetworkResurrector.Application/Events/MachineShutdown.cs b/src/server/NetworkResurrector.Server.Application/Events/MachineShutdown.cs similarity index 85% rename from NetworkResurrector.Application/Events/MachineShutdown.cs rename to src/server/NetworkResurrector.Server.Application/Events/MachineShutdown.cs index 89f81ab..4ca2ccc 100644 --- a/NetworkResurrector.Application/Events/MachineShutdown.cs +++ b/src/server/NetworkResurrector.Server.Application/Events/MachineShutdown.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text; -namespace NetworkResurrector.Application.Events +namespace NetworkResurrector.Server.Application.Events { public class MachineShutdown { diff --git a/NetworkResurrector.Application/Events/MachineWaked.cs b/src/server/NetworkResurrector.Server.Application/Events/MachineWaked.cs similarity index 81% rename from NetworkResurrector.Application/Events/MachineWaked.cs rename to src/server/NetworkResurrector.Server.Application/Events/MachineWaked.cs index f249f9d..2ee5973 100644 --- a/NetworkResurrector.Application/Events/MachineWaked.cs +++ b/src/server/NetworkResurrector.Server.Application/Events/MachineWaked.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Application.Events +namespace NetworkResurrector.Server.Application.Events { public class MachineWaked { diff --git a/NetworkResurrector.Application/Mappings/MappingProfile.cs b/src/server/NetworkResurrector.Server.Application/Mappings/MappingProfile.cs similarity index 74% rename from NetworkResurrector.Application/Mappings/MappingProfile.cs rename to src/server/NetworkResurrector.Server.Application/Mappings/MappingProfile.cs index 78ed624..2b2729b 100644 --- a/NetworkResurrector.Application/Mappings/MappingProfile.cs +++ b/src/server/NetworkResurrector.Server.Application/Mappings/MappingProfile.cs @@ -1,6 +1,6 @@ using AutoMapper; -namespace NetworkResurrector.Application.Mappings +namespace NetworkResurrector.Server.Application.Mappings { public class MappingProfile : Profile { diff --git a/NetworkResurrector.Application/NetworkResurrector.Application.csproj b/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj similarity index 81% rename from NetworkResurrector.Application/NetworkResurrector.Application.csproj rename to src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj index 784cfbe..509a5bc 100644 --- a/NetworkResurrector.Application/NetworkResurrector.Application.csproj +++ b/src/server/NetworkResurrector.Server.Application/NetworkResurrector.Server.Application.csproj @@ -16,8 +16,8 @@ - - + + diff --git a/NetworkResurrector.Application/Queries/GetServiceVersion.cs b/src/server/NetworkResurrector.Server.Application/Queries/GetServiceVersion.cs similarity index 50% rename from NetworkResurrector.Application/Queries/GetServiceVersion.cs rename to src/server/NetworkResurrector.Server.Application/Queries/GetServiceVersion.cs index 82a89e4..d8acaeb 100644 --- a/NetworkResurrector.Application/Queries/GetServiceVersion.cs +++ b/src/server/NetworkResurrector.Server.Application/Queries/GetServiceVersion.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Application.Queries +namespace NetworkResurrector.Server.Application.Queries { class GetServiceVersion { diff --git a/NetworkResurrector.Application/Services/IPingService.cs b/src/server/NetworkResurrector.Server.Application/Services/IPingService.cs similarity index 74% rename from NetworkResurrector.Application/Services/IPingService.cs rename to src/server/NetworkResurrector.Server.Application/Services/IPingService.cs index 35cfb89..154689c 100644 --- a/NetworkResurrector.Application/Services/IPingService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/IPingService.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public interface IPingService { diff --git a/NetworkResurrector.Application/Services/IShutdownService.cs b/src/server/NetworkResurrector.Server.Application/Services/IShutdownService.cs similarity index 84% rename from NetworkResurrector.Application/Services/IShutdownService.cs rename to src/server/NetworkResurrector.Server.Application/Services/IShutdownService.cs index ac6737e..c4e1958 100644 --- a/NetworkResurrector.Application/Services/IShutdownService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/IShutdownService.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public interface IShutdownService { diff --git a/NetworkResurrector.Application/Services/IValidationService.cs b/src/server/NetworkResurrector.Server.Application/Services/IValidationService.cs similarity index 62% rename from NetworkResurrector.Application/Services/IValidationService.cs rename to src/server/NetworkResurrector.Server.Application/Services/IValidationService.cs index 531c8a2..b6fea26 100644 --- a/NetworkResurrector.Application/Services/IValidationService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/IValidationService.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public interface IValidationService { diff --git a/NetworkResurrector.Application/Services/ParamProvider.cs b/src/server/NetworkResurrector.Server.Application/Services/ParamProvider.cs similarity index 77% rename from NetworkResurrector.Application/Services/ParamProvider.cs rename to src/server/NetworkResurrector.Server.Application/Services/ParamProvider.cs index fbae246..8d6b5a5 100644 --- a/NetworkResurrector.Application/Services/ParamProvider.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/ParamProvider.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.Configuration; -using NetworkResurrector.Domain.Services; +using NetworkResurrector.Server.Domain.Services; -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public class ParamProvider : IParamProvider { diff --git a/NetworkResurrector.Application/Services/PingService.cs b/src/server/NetworkResurrector.Server.Application/Services/PingService.cs similarity index 97% rename from NetworkResurrector.Application/Services/PingService.cs rename to src/server/NetworkResurrector.Server.Application/Services/PingService.cs index 89868db..c7321f5 100644 --- a/NetworkResurrector.Application/Services/PingService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/PingService.cs @@ -2,7 +2,7 @@ using System.Text; using System.Threading.Tasks; -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public class PingService : IPingService { diff --git a/NetworkResurrector.Application/Services/ShutdownService.cs b/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs similarity index 98% rename from NetworkResurrector.Application/Services/ShutdownService.cs rename to src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs index 9712d04..c04992a 100644 --- a/NetworkResurrector.Application/Services/ShutdownService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/ShutdownService.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using System.Linq; using System.Management; -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public class ShutdownService : IShutdownService { diff --git a/NetworkResurrector.Application/Services/ValidationService.cs b/src/server/NetworkResurrector.Server.Application/Services/ValidationService.cs similarity index 95% rename from NetworkResurrector.Application/Services/ValidationService.cs rename to src/server/NetworkResurrector.Server.Application/Services/ValidationService.cs index 567ac7b..0f92f8b 100644 --- a/NetworkResurrector.Application/Services/ValidationService.cs +++ b/src/server/NetworkResurrector.Server.Application/Services/ValidationService.cs @@ -2,7 +2,7 @@ using System; using System.Net; -namespace NetworkResurrector.Application.Services +namespace NetworkResurrector.Server.Application.Services { public class ValidationService : IValidationService { diff --git a/NetworkResurrector.Application/Stores/ISecurityStore.cs b/src/server/NetworkResurrector.Server.Application/Stores/ISecurityStore.cs similarity index 59% rename from NetworkResurrector.Application/Stores/ISecurityStore.cs rename to src/server/NetworkResurrector.Server.Application/Stores/ISecurityStore.cs index 87ef287..5d965d2 100644 --- a/NetworkResurrector.Application/Stores/ISecurityStore.cs +++ b/src/server/NetworkResurrector.Server.Application/Stores/ISecurityStore.cs @@ -1,6 +1,6 @@ -using NetworkResurrector.Domain.Models; +using NetworkResurrector.Server.Domain.Models; -namespace NetworkResurrector.Application.Stores +namespace NetworkResurrector.Server.Application.Stores { public interface ISecurityStore { diff --git a/NetworkResurrector.Application/Stores/SecurityStore.cs b/src/server/NetworkResurrector.Server.Application/Stores/SecurityStore.cs similarity index 92% rename from NetworkResurrector.Application/Stores/SecurityStore.cs rename to src/server/NetworkResurrector.Server.Application/Stores/SecurityStore.cs index 4ebbb72..0176c0d 100644 --- a/NetworkResurrector.Application/Stores/SecurityStore.cs +++ b/src/server/NetworkResurrector.Server.Application/Stores/SecurityStore.cs @@ -1,8 +1,8 @@ -using NetworkResurrector.Domain.Models; +using NetworkResurrector.Server.Domain.Models; using System.Collections.Generic; using System.Linq; -namespace NetworkResurrector.Application.Stores +namespace NetworkResurrector.Server.Application.Stores { public class SecurityStore : ISecurityStore { diff --git a/NetworkResurrector.Domain/Models/SecurityToken.cs b/src/server/NetworkResurrector.Server.Domain/Models/SecurityToken.cs similarity index 79% rename from NetworkResurrector.Domain/Models/SecurityToken.cs rename to src/server/NetworkResurrector.Server.Domain/Models/SecurityToken.cs index 63afc61..a569c9f 100644 --- a/NetworkResurrector.Domain/Models/SecurityToken.cs +++ b/src/server/NetworkResurrector.Server.Domain/Models/SecurityToken.cs @@ -1,6 +1,6 @@ using System; -namespace NetworkResurrector.Domain.Models +namespace NetworkResurrector.Server.Domain.Models { public class SecurityToken { diff --git a/NetworkResurrector.Domain/Models/Settings/Credentials.cs b/src/server/NetworkResurrector.Server.Domain/Models/Settings/Credentials.cs similarity index 68% rename from NetworkResurrector.Domain/Models/Settings/Credentials.cs rename to src/server/NetworkResurrector.Server.Domain/Models/Settings/Credentials.cs index a1d2b4e..44b32c4 100644 --- a/NetworkResurrector.Domain/Models/Settings/Credentials.cs +++ b/src/server/NetworkResurrector.Server.Domain/Models/Settings/Credentials.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Domain.Models.Settings +namespace NetworkResurrector.Server.Domain.Models.Settings { public class Credentials { diff --git a/NetworkResurrector.Domain/Models/TokenValidation.cs b/src/server/NetworkResurrector.Server.Domain/Models/TokenValidation.cs similarity index 71% rename from NetworkResurrector.Domain/Models/TokenValidation.cs rename to src/server/NetworkResurrector.Server.Domain/Models/TokenValidation.cs index 7217153..e1f6d08 100644 --- a/NetworkResurrector.Domain/Models/TokenValidation.cs +++ b/src/server/NetworkResurrector.Server.Domain/Models/TokenValidation.cs @@ -1,4 +1,4 @@ -namespace NetworkResurrector.Domain.Models +namespace NetworkResurrector.Server.Domain.Models { public class TokenValidation { diff --git a/NetworkResurrector.Domain/NetworkResurrector.Domain.csproj b/src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj similarity index 100% rename from NetworkResurrector.Domain/NetworkResurrector.Domain.csproj rename to src/server/NetworkResurrector.Server.Domain/NetworkResurrector.Server.Domain.csproj diff --git a/src/server/NetworkResurrector.Server.Domain/Services/IParamProvider.cs b/src/server/NetworkResurrector.Server.Domain/Services/IParamProvider.cs new file mode 100644 index 0000000..75b1ff4 --- /dev/null +++ b/src/server/NetworkResurrector.Server.Domain/Services/IParamProvider.cs @@ -0,0 +1,6 @@ +namespace NetworkResurrector.Server.Domain.Services +{ + public interface IParamProvider + { + } +} diff --git a/NetworkResurrector.Api/Controllers/ResurrectorController.cs b/src/server/NetworkResurrector.Server/Controllers/ResurrectorController.cs similarity index 91% rename from NetworkResurrector.Api/Controllers/ResurrectorController.cs rename to src/server/NetworkResurrector.Server/Controllers/ResurrectorController.cs index 1080256..0e4ed98 100644 --- a/NetworkResurrector.Api/Controllers/ResurrectorController.cs +++ b/src/server/NetworkResurrector.Server/Controllers/ResurrectorController.cs @@ -1,10 +1,10 @@ using MediatR; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using NetworkResurrector.Application.Commands; +using NetworkResurrector.Server.Application.Commands; using System.Threading.Tasks; -namespace NetworkResurrector.Api.Controllers +namespace NetworkResurrector.Server.Controllers { [Authorize] [ApiController] diff --git a/NetworkResurrector.Api/Extensions/WakeOnLanExtensions.cs b/src/server/NetworkResurrector.Server/Extensions/WakeOnLanExtensions.cs similarity index 95% rename from NetworkResurrector.Api/Extensions/WakeOnLanExtensions.cs rename to src/server/NetworkResurrector.Server/Extensions/WakeOnLanExtensions.cs index 91034eb..aab900f 100644 --- a/NetworkResurrector.Api/Extensions/WakeOnLanExtensions.cs +++ b/src/server/NetworkResurrector.Server/Extensions/WakeOnLanExtensions.cs @@ -4,7 +4,7 @@ using NetworkResurrector.WakeOnLan.Inhouse; using NetworkResurrector.WakeOnLan.Nikeee; using System; -namespace NetworkResurrector.Api.Extensions +namespace NetworkResurrector.Server.Extensions { public static class WakeOnLanExtensions { diff --git a/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj b/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj similarity index 83% rename from NetworkResurrector.Agent/NetworkResurrector.Agent.csproj rename to src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj index 46a7ae4..a8a0442 100644 --- a/NetworkResurrector.Agent/NetworkResurrector.Agent.csproj +++ b/src/server/NetworkResurrector.Server/NetworkResurrector.Server.csproj @@ -2,7 +2,6 @@ netcoreapp3.1 - Linux @@ -23,8 +22,9 @@ - - + + + diff --git a/NetworkResurrector.Api/Program.cs b/src/server/NetworkResurrector.Server/Program.cs similarity index 98% rename from NetworkResurrector.Api/Program.cs rename to src/server/NetworkResurrector.Server/Program.cs index 698d6b8..61f5775 100644 --- a/NetworkResurrector.Api/Program.cs +++ b/src/server/NetworkResurrector.Server/Program.cs @@ -10,7 +10,7 @@ using System.Diagnostics; using System.IO; using System.Linq; -namespace NetworkResurrector.Api +namespace NetworkResurrector.Server { public class Program { diff --git a/NetworkResurrector.Agent/Properties/launchSettings.json b/src/server/NetworkResurrector.Server/Properties/launchSettings.json similarity index 85% rename from NetworkResurrector.Agent/Properties/launchSettings.json rename to src/server/NetworkResurrector.Server/Properties/launchSettings.json index 6c62a80..9163bc0 100644 --- a/NetworkResurrector.Agent/Properties/launchSettings.json +++ b/src/server/NetworkResurrector.Server/Properties/launchSettings.json @@ -1,6 +1,6 @@ { "profiles": { - "NetworkResurrector.Agent": { + "NetworkResurrector.Server": { "commandName": "Project", "applicationUrl": "http://localhost:5000", "environmentVariables": { diff --git a/NetworkResurrector.Api/Startup.cs b/src/server/NetworkResurrector.Server/Startup.cs similarity index 95% rename from NetworkResurrector.Api/Startup.cs rename to src/server/NetworkResurrector.Server/Startup.cs index 341e7c1..eaf71f6 100644 --- a/NetworkResurrector.Api/Startup.cs +++ b/src/server/NetworkResurrector.Server/Startup.cs @@ -8,12 +8,12 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using NDB.Extensions.Swagger; using NDB.Security.Authentication.Identity; -using NetworkResurrector.Api.Extensions; -using NetworkResurrector.Application; +using NetworkResurrector.Server.Extensions; +using NetworkResurrector.Server.Application; using Newtonsoft.Json; using System.Reflection; -namespace NetworkResurrector.Api +namespace NetworkResurrector.Server { public class Startup { diff --git a/NetworkResurrector.Api/appsettings.Development.json b/src/server/NetworkResurrector.Server/appsettings.Development.json similarity index 100% rename from NetworkResurrector.Api/appsettings.Development.json rename to src/server/NetworkResurrector.Server/appsettings.Development.json diff --git a/NetworkResurrector.Api/appsettings.json b/src/server/NetworkResurrector.Server/appsettings.json similarity index 100% rename from NetworkResurrector.Api/appsettings.json rename to src/server/NetworkResurrector.Server/appsettings.json diff --git a/NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs b/src/server/NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs similarity index 89% rename from NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs rename to src/server/NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs index fa16731..eb6ce31 100644 --- a/NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs +++ b/src/server/NetworkResurrector.WakeOnLan.Inhouse/DependencyInjectionExtensions.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using NetworkResurrector.Abstractions; +using NetworkResurrector.Server.Abstractions; namespace NetworkResurrector.WakeOnLan.Inhouse { diff --git a/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj b/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj similarity index 72% rename from NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj rename to src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj index 6ce5cd3..1ed583d 100644 --- a/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj +++ b/src/server/NetworkResurrector.WakeOnLan.Inhouse/NetworkResurrector.WakeOnLan.Inhouse.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -8,9 +8,9 @@ - + - + diff --git a/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs b/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs similarity index 100% rename from NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs rename to src/server/NetworkResurrector.WakeOnLan.Inhouse/WolClient.cs diff --git a/NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs b/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs similarity index 98% rename from NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs rename to src/server/NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs index a6fda62..8dd18a7 100644 --- a/NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs +++ b/src/server/NetworkResurrector.WakeOnLan.Inhouse/WolDriver.cs @@ -1,4 +1,4 @@ -using NetworkResurrector.Abstractions; +using NetworkResurrector.Server.Abstractions; using System.Globalization; using System.Net; using System.Text.RegularExpressions; diff --git a/NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs b/src/server/NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs similarity index 88% rename from NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs rename to src/server/NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs index e40b483..a4c03b7 100644 --- a/NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs +++ b/src/server/NetworkResurrector.WakeOnLan.Nikeee/DependencyInjectionExtensions.cs @@ -1,5 +1,5 @@ using Microsoft.Extensions.DependencyInjection; -using NetworkResurrector.Abstractions; +using NetworkResurrector.Server.Abstractions; namespace NetworkResurrector.WakeOnLan.Nikeee { diff --git a/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj b/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj similarity index 75% rename from NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj rename to src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj index cd8f6b3..aaec578 100644 --- a/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj +++ b/src/server/NetworkResurrector.WakeOnLan.Nikeee/NetworkResurrector.WakeOnLan.Nikeee.csproj @@ -1,4 +1,4 @@ - + netstandard2.0 @@ -11,7 +11,7 @@ - + diff --git a/NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs b/src/server/NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs similarity index 89% rename from NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs rename to src/server/NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs index f7a1772..f1259f9 100644 --- a/NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs +++ b/src/server/NetworkResurrector.WakeOnLan.Nikeee/WakeOnLanService.cs @@ -1,4 +1,4 @@ -using NetworkResurrector.Abstractions; +using NetworkResurrector.Server.Abstractions; using System.Net; using System.Net.NetworkInformation; using System.Threading.Tasks;