diff --git a/FWLAZ_Web/.config/dotnet-tools.json b/FWLAZ_Web/.config/dotnet-tools.json new file mode 100644 index 0000000..9fab42f --- /dev/null +++ b/FWLAZ_Web/.config/dotnet-tools.json @@ -0,0 +1,13 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "8.0.8", + "commands": [ + "dotnet-ef" + ], + "rollForward": false + } + } +} \ No newline at end of file diff --git a/FWLAZ_Web/Data/quiz.db-shm b/FWLAZ_Web/Data/quiz.db-shm index 88aae53..fe9ac28 100644 Binary files a/FWLAZ_Web/Data/quiz.db-shm and b/FWLAZ_Web/Data/quiz.db-shm differ diff --git a/FWLAZ_Web/Data/quiz.db-wal b/FWLAZ_Web/Data/quiz.db-wal index 6c3f1ff..e69de29 100644 Binary files a/FWLAZ_Web/Data/quiz.db-wal and b/FWLAZ_Web/Data/quiz.db-wal differ diff --git a/FWLAZ_Web/Dockerfile b/FWLAZ_Web/Dockerfile index 4acd648..3a45c1b 100644 --- a/FWLAZ_Web/Dockerfile +++ b/FWLAZ_Web/Dockerfile @@ -1,15 +1,20 @@ +ARG DOTNET_RUNTIME=mcr.microsoft.com/dotnet/aspnet:8.0 +ARG DOTNET_SDK=mcr.microsoft.com/dotnet/sdk:8.0 + # Unter https://aka.ms/customizecontainer erfahren Sie, wie Sie Ihren Debugcontainer anpassen und wie Visual Studio dieses Dockerfile verwendet, um Ihre Images für ein schnelleres Debuggen zu erstellen. # Diese Stufe wird verwendet, wenn sie von VS im Schnellmodus ausgeführt wird (Standardeinstellung für Debugkonfiguration). -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +FROM ${DOTNET_RUNTIME} AS base USER app WORKDIR /app +ENV ASPNETCORE_URLS=http://+:8080 +ENV ASPNETCORE_ENVIRONMENT=Development EXPOSE 8080 EXPOSE 8081 # Diese Stufe wird zum Erstellen des Dienstprojekts verwendet. -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +FROM ${DOTNET_SDK} AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["FWLAZ_Web.csproj", "."] @@ -23,15 +28,12 @@ FROM build AS publish ARG BUILD_CONFIGURATION=Release RUN dotnet publish "./FWLAZ_Web.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false -# Set Write Permissions to database -# FROM docker.io/library/alpine:3.20 -# RUN chmod 755 /Data/quiz.db - - # Diese Stufe wird in der Produktion oder bei Ausführung von VS im regulären Modus verwendet (Standard, wenn die Debugkonfiguration nicht verwendet wird). FROM base AS final WORKDIR /app COPY --from=publish /app/publish . +VOLUME /app/Data +USER root ENTRYPOINT ["dotnet", "FWLAZ_Web.dll"] # Invalid diff --git a/FWLAZ_Web/appsettings.json b/FWLAZ_Web/appsettings.json index 6420e5c..7b29712 100644 --- a/FWLAZ_Web/appsettings.json +++ b/FWLAZ_Web/appsettings.json @@ -9,7 +9,7 @@ "QuizDB": "Data Source=Data/quiz.db" }, "AppSettings": { - "RegistrationEnabled": true + "RegistrationEnabled": false }, "AllowedHosts": "*" }