diff --git a/backend/SinkyShipsAPI.sln b/backend/LeakyShipsAPI.sln similarity index 83% rename from backend/SinkyShipsAPI.sln rename to backend/LeakyShipsAPI.sln index eed50ed..b61a1f6 100644 --- a/backend/SinkyShipsAPI.sln +++ b/backend/LeakyShipsAPI.sln @@ -1,6 +1,6 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SinkyShipsAPI", "SinkyShipsAPI\SinkyShipsAPI.csproj", "{FB7A524F-B0C9-44DB-B1D9-776E01B28D93}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LeakyShipsAPI", "LeakyShipsAPI\LeakyShipsAPI.csproj", "{FB7A524F-B0C9-44DB-B1D9-776E01B28D93}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/backend/SinkyShipsAPI/.dockerignore b/backend/LeakyShipsAPI/.dockerignore similarity index 100% rename from backend/SinkyShipsAPI/.dockerignore rename to backend/LeakyShipsAPI/.dockerignore diff --git a/backend/LeakyShipsAPI/Dockerfile b/backend/LeakyShipsAPI/Dockerfile new file mode 100644 index 0000000..492fdf8 --- /dev/null +++ b/backend/LeakyShipsAPI/Dockerfile @@ -0,0 +1,20 @@ +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base +WORKDIR /app +EXPOSE 80 +EXPOSE 443 + +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +WORKDIR /src +COPY ["LeakyShipsAPI/LeakyShipsAPI.csproj", "LeakyShipsAPI/"] +RUN dotnet restore "LeakyShipsAPI/LeakyShipsAPI.csproj" +COPY . . +WORKDIR "/src/LeakyShipsAPI" +RUN dotnet build "LeakyShipsAPI.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "LeakyShipsAPI.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "LeakyShipsAPI.dll"] diff --git a/backend/SinkyShipsAPI/Hubs/GameHub.cs b/backend/LeakyShipsAPI/Hubs/GameHub.cs similarity index 71% rename from backend/SinkyShipsAPI/Hubs/GameHub.cs rename to backend/LeakyShipsAPI/Hubs/GameHub.cs index e85a8b6..5f835ab 100644 --- a/backend/SinkyShipsAPI/Hubs/GameHub.cs +++ b/backend/LeakyShipsAPI/Hubs/GameHub.cs @@ -1,6 +1,6 @@ using Microsoft.AspNetCore.SignalR; -namespace SinkyShipsAPI.Hubs; +namespace LeakyShipsAPI.Hubs; public class GameHub : Hub { diff --git a/backend/SinkyShipsAPI/SinkyShipsAPI.csproj b/backend/LeakyShipsAPI/LeakyShipsAPI.csproj similarity index 100% rename from backend/SinkyShipsAPI/SinkyShipsAPI.csproj rename to backend/LeakyShipsAPI/LeakyShipsAPI.csproj diff --git a/backend/LeakyShipsAPI/Model/Board.cs b/backend/LeakyShipsAPI/Model/Board.cs new file mode 100644 index 0000000..88dd649 --- /dev/null +++ b/backend/LeakyShipsAPI/Model/Board.cs @@ -0,0 +1,3 @@ +namespace LeakyShipsAPI.Model; + +public record Board(Guid Id); \ No newline at end of file diff --git a/backend/SinkyShipsAPI/Model/Player.cs b/backend/LeakyShipsAPI/Model/Player.cs similarity index 56% rename from backend/SinkyShipsAPI/Model/Player.cs rename to backend/LeakyShipsAPI/Model/Player.cs index 260436f..7668621 100644 --- a/backend/SinkyShipsAPI/Model/Player.cs +++ b/backend/LeakyShipsAPI/Model/Player.cs @@ -1,3 +1,3 @@ -namespace SinkyShipsAPI.Model; +namespace LeakyShipsAPI.Model; public record Player(Guid Id, string Name); \ No newline at end of file diff --git a/backend/SinkyShipsAPI/Model/Session.cs b/backend/LeakyShipsAPI/Model/Session.cs similarity index 66% rename from backend/SinkyShipsAPI/Model/Session.cs rename to backend/LeakyShipsAPI/Model/Session.cs index 97c5ee7..67f3b6d 100644 --- a/backend/SinkyShipsAPI/Model/Session.cs +++ b/backend/LeakyShipsAPI/Model/Session.cs @@ -1,3 +1,3 @@ -namespace SinkyShipsAPI.Model; +namespace LeakyShipsAPI.Model; public record Session(Guid Id, Player PlayerOne, Player PlayerTwo); \ No newline at end of file diff --git a/backend/SinkyShipsAPI/Program.cs b/backend/LeakyShipsAPI/Program.cs similarity index 97% rename from backend/SinkyShipsAPI/Program.cs rename to backend/LeakyShipsAPI/Program.cs index f3e8107..07b3514 100644 --- a/backend/SinkyShipsAPI/Program.cs +++ b/backend/LeakyShipsAPI/Program.cs @@ -1,4 +1,4 @@ -using SinkyShipsAPI.Hubs; +using LeakyShipsAPI.Hubs; var builder = WebApplication.CreateBuilder(args); builder.Services.AddControllers(); diff --git a/backend/SinkyShipsAPI/Properties/launchSettings.json b/backend/LeakyShipsAPI/Properties/launchSettings.json similarity index 96% rename from backend/SinkyShipsAPI/Properties/launchSettings.json rename to backend/LeakyShipsAPI/Properties/launchSettings.json index 7b5d3e5..2cc094a 100644 --- a/backend/SinkyShipsAPI/Properties/launchSettings.json +++ b/backend/LeakyShipsAPI/Properties/launchSettings.json @@ -8,7 +8,7 @@ } }, "profiles": { - "SinkyShipsAPI": { + "LeakyShipsAPI": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, diff --git a/backend/SinkyShipsAPI/Repositories/IRepository.cs b/backend/LeakyShipsAPI/Repositories/IRepository.cs similarity index 83% rename from backend/SinkyShipsAPI/Repositories/IRepository.cs rename to backend/LeakyShipsAPI/Repositories/IRepository.cs index cb719a2..21809e8 100644 --- a/backend/SinkyShipsAPI/Repositories/IRepository.cs +++ b/backend/LeakyShipsAPI/Repositories/IRepository.cs @@ -1,6 +1,6 @@ using System.Dynamic; -namespace SinkyShipsAPI.Repositories; +namespace LeakyShipsAPI.Repositories; public interface IRepository { diff --git a/backend/LeakyShipsAPI/Repositories/PlayerRepository.cs b/backend/LeakyShipsAPI/Repositories/PlayerRepository.cs new file mode 100644 index 0000000..2035005 --- /dev/null +++ b/backend/LeakyShipsAPI/Repositories/PlayerRepository.cs @@ -0,0 +1,6 @@ +namespace LeakyShipsAPI.Repositories; + +public class PlayerRepository +{ + +} \ No newline at end of file diff --git a/backend/SinkyShipsAPI/Repositories/SessionRepository.cs b/backend/LeakyShipsAPI/Repositories/SessionRepository.cs similarity index 86% rename from backend/SinkyShipsAPI/Repositories/SessionRepository.cs rename to backend/LeakyShipsAPI/Repositories/SessionRepository.cs index a713f52..b9223a1 100644 --- a/backend/SinkyShipsAPI/Repositories/SessionRepository.cs +++ b/backend/LeakyShipsAPI/Repositories/SessionRepository.cs @@ -1,6 +1,6 @@ -using SinkyShipsAPI.Model; +using LeakyShipsAPI.Model; -namespace SinkyShipsAPI.Repositories; +namespace LeakyShipsAPI.Repositories; public class SessionRepository : IRepository { diff --git a/backend/SinkyShipsAPI/appsettings.Development.json b/backend/LeakyShipsAPI/appsettings.Development.json similarity index 100% rename from backend/SinkyShipsAPI/appsettings.Development.json rename to backend/LeakyShipsAPI/appsettings.Development.json diff --git a/backend/SinkyShipsAPI/appsettings.json b/backend/LeakyShipsAPI/appsettings.json similarity index 100% rename from backend/SinkyShipsAPI/appsettings.json rename to backend/LeakyShipsAPI/appsettings.json diff --git a/backend/SinkyShipsAPI/Dockerfile b/backend/SinkyShipsAPI/Dockerfile deleted file mode 100644 index da2ae4b..0000000 --- a/backend/SinkyShipsAPI/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base -WORKDIR /app -EXPOSE 80 -EXPOSE 443 - -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build -WORKDIR /src -COPY ["SinkyShipsAPI/SinkyShipsAPI.csproj", "SinkyShipsAPI/"] -RUN dotnet restore "SinkyShipsAPI/SinkyShipsAPI.csproj" -COPY . . -WORKDIR "/src/SinkyShipsAPI" -RUN dotnet build "SinkyShipsAPI.csproj" -c Release -o /app/build - -FROM build AS publish -RUN dotnet publish "SinkyShipsAPI.csproj" -c Release -o /app/publish - -FROM base AS final -WORKDIR /app -COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "SinkyShipsAPI.dll"] diff --git a/backend/SinkyShipsAPI/Model/Board.cs b/backend/SinkyShipsAPI/Model/Board.cs deleted file mode 100644 index 0385f96..0000000 --- a/backend/SinkyShipsAPI/Model/Board.cs +++ /dev/null @@ -1,3 +0,0 @@ -namespace SinkyShipsAPI.Model; - -public record Board(Guid Id); \ No newline at end of file diff --git a/backend/SinkyShipsAPI/Repositories/PlayerRepository.cs b/backend/SinkyShipsAPI/Repositories/PlayerRepository.cs deleted file mode 100644 index 300e355..0000000 --- a/backend/SinkyShipsAPI/Repositories/PlayerRepository.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace SinkyShipsAPI.Repositories; - -public class PlayerRepository -{ - -} \ No newline at end of file