This commit is contained in:
Jordan Geurtsen
2023-03-20 15:59:11 +01:00
parent e9ca9a085e
commit 9fa7e21406
4 changed files with 36 additions and 1 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
.idea/
.git/
.gitignore
README.md

15
Deploymaunt/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS base
WORKDIR /app
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
COPY ../ /src/
WORKDIR /src
RUN dotnet build "MauMau-Server.csproj" -c Release -o out
FROM build AS publish
RUN dotnet publish "MauMau-Server.csproj" -c Release -o /app/publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MauMau-Server.dll"]

View File

@@ -0,0 +1,15 @@
version: '3.9'
services:
server:
build:
context: .
dockerfile: Dockerfile
target: final
container_name: 'MauMau-server'
restart: always
networks:
- maumau
networks:
maumau:
# hier later extern naar client
driver: bridge

View File

@@ -5,6 +5,8 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MauMau_Server</RootNamespace> <RootNamespace>MauMau_Server</RootNamespace>
<AssemblyName>MauMau_Server</AssemblyName>
<OutputPath>out\</OutputPath>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@@ -12,5 +14,4 @@
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.3" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.3" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup> </ItemGroup>
</Project> </Project>