diff --git a/HaWeb/Dockerfile b/HaWeb/Dockerfile new file mode 100644 index 0000000..d669ae2 --- /dev/null +++ b/HaWeb/Dockerfile @@ -0,0 +1,24 @@ +# PREREQUISITES +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +RUN apt update +RUN apt install openssh-server nodejs npm -y + +# CLONE & SETUP +RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git +RUN mkdir /data/ +RUN mkdir /data/hamann/ +RUN mkdir /data/xml/ +RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-xml.git /data/xml/ + +# COMPILE & PUBLISH +WORKDIR hamann-ausgabe-core/HaWeb/ +RUN dotnet restore +RUN npm install +RUN npm run css_build +RUN dotnet publish --no-restore -o /app + +# RUN +WORKDIR /app +RUN export DOTNET_ENVIRONMENT="Docker" +RUN dotnet HaWeb.dll +EXPOSE 5000 diff --git a/HaWeb/appsettings.Docker.json b/HaWeb/appsettings.Docker.json new file mode 100644 index 0000000..ab4b907 --- /dev/null +++ b/HaWeb/appsettings.Docker.json @@ -0,0 +1,28 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "FeatureManagement": { + "AdminService": true, + "LocalPublishService": true, + "SyntaxCheck": true, + "Notifications": true + }, + "AllowedWebSocketConnections": "*", + "AllowedHosts": "*", + "HamannFileStoreLinux": "/data/hamann/", + "BareRepositoryPathLinux": "/data/xml/.git/", + "BareRepositoryPathWindows": "C:/Users/simon/source/hamann-xml/.git/", + "WorkingTreePathLinux": "/data/xml/", + "RepositoryBranch": "main", + "RepositoryURL": "https://github.com/Theodor-Springmann-Stiftung/hamann-xml", + "StoredPDFPathWindows": "", + "StoredPDFPathLinux": "", + "FileSizeLimit": 52428800, + "AvailableStartYear": 1700, + "AvailableEndYear": 1800, + "LettersOnPage": 80 +} \ No newline at end of file