From eecf5eb4c6f1b4183ccba3c16dd40f57f8467ac4 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 09:01:27 +0200 Subject: [PATCH 01/29] build script for maui apk adjusted --- IaC/build-android.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IaC/build-android.ps1 b/IaC/build-android.ps1 index 55d74be..e5b6f45 100644 --- a/IaC/build-android.ps1 +++ b/IaC/build-android.ps1 @@ -1,2 +1,7 @@ -cd.. +$location = Get-Location +if(!$location.Path.Contains("RBLNews.Web")) +{ + cd ../RBLNews.Maui +} + dotnet publish -c Release -r android-arm64 -p:PackageFormat=Apk -f net8.0-android34.0 --sc true \ No newline at end of file -- 2.43.0 From d7e614fbd605f5dbe7d587fb721e207f0497ac48 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:13:24 +0200 Subject: [PATCH 02/29] fix yml file for test env --- .github/workflows/deploy.test-env.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 85fe710..3ff5842 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -22,7 +22,7 @@ jobs: with: registry: git.wohlleben.dev username: ${{ gitea.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} + password: ${{ vars.REGISTRY_TOKEN }} - name: Build and push WebApp container image run: | TODAY=$(date +'%Y-%m-%d') @@ -32,9 +32,9 @@ jobs: - name: Restart all Docker Container on Test Environment uses: appleboy/ssh-action@v1.0.3 with: - host: ${{ secrets.DOCKER_VM_HOST_ADDRESS }} - username: ${{ secrets.DOCKER_VM_HOST_ROOT_USERNAME }} - key: ${{ secrets.DOCKER_VM_SSH_USER_ROOT }} + host: ${{ vars.SRV02_DOCKER_VM_HOST_ADDRESS }} + username: ${{ vars.SRV02_DOCKER_VM_USER_NAME }} + key: ${{ vars.SRV02_DOCKER_VM_ROOT_USER_SSH_KEY }} script: | docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp -- 2.43.0 From e10e7f3c85ada99d28a03e8cdc6fc7bab8ac1eba Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:16:02 +0200 Subject: [PATCH 03/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index 0220130..8851bd4 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -7,8 +7,8 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src -COPY ["../../RBLNews.Web/RBLNews.Shared.csproj", "RBLNews.Shared/"] -RUN dotnet restore "RBLFeeder/RBLNews.Web.csproj" +COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] +RUN dotnet restore "RBLNews/RBLNews.Web.csproj" COPY . . WORKDIR "/src/RBLNews.Web" RUN dotnet build "RBLNews.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build -- 2.43.0 From 576940ae1c140d22fdd4879d03ba56c2604ae947 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:21:33 +0200 Subject: [PATCH 04/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index 8851bd4..c2a2398 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -7,6 +7,7 @@ EXPOSE 443 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src +COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"] COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] RUN dotnet restore "RBLNews/RBLNews.Web.csproj" COPY . . -- 2.43.0 From ed03b80e6a855a2ed73fd6aad51c6f43b696f83d Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:25:59 +0200 Subject: [PATCH 05/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index c2a2398..b8bc252 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -9,7 +9,7 @@ ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"] COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] -RUN dotnet restore "RBLNews/RBLNews.Web.csproj" +RUN dotnet restore "RBLNews.Web/RBLNews.Web.csproj" COPY . . WORKDIR "/src/RBLNews.Web" RUN dotnet build "RBLNews.Web.csproj" -c $BUILD_CONFIGURATION -o /app/build -- 2.43.0 From d00b71d43ad9bb4ed3e4797ae3c3c67f397a1d90 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:33:28 +0200 Subject: [PATCH 06/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index b8bc252..0235c80 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -9,6 +9,9 @@ ARG BUILD_CONFIGURATION=Release WORKDIR /src COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"] COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] +RUN dotnet nuget add source --name itob https://git.wohlleben.dev/api/packages/itob/nuget/index.json +RUN dotnet nuget disable source "nuget.org" +RUN dotnet add package --source itob --version 1.0.0 RBLFeederCommon RUN dotnet restore "RBLNews.Web/RBLNews.Web.csproj" COPY . . WORKDIR "/src/RBLNews.Web" -- 2.43.0 From 9122ddd117fdf9e9c163f57d33adcacad88f4e4f Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:38:14 +0200 Subject: [PATCH 07/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index 0235c80..e3f68ef 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -11,7 +11,6 @@ COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"] COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] RUN dotnet nuget add source --name itob https://git.wohlleben.dev/api/packages/itob/nuget/index.json RUN dotnet nuget disable source "nuget.org" -RUN dotnet add package --source itob --version 1.0.0 RBLFeederCommon RUN dotnet restore "RBLNews.Web/RBLNews.Web.csproj" COPY . . WORKDIR "/src/RBLNews.Web" -- 2.43.0 From 70ec3e822e2492a1b883783bc56ff7b4fa8491f1 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 10:38:50 +0200 Subject: [PATCH 08/29] fix dockerfile --- IaC/RBLNews.Web/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index e3f68ef..d357437 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -10,7 +10,6 @@ WORKDIR /src COPY ["../../RBLNews.Web/RBLNews.Web.csproj", "RBLNews.Web/"] COPY ["../../RBLNews.Shared/RBLNews.Shared.csproj", "RBLNews.Shared/"] RUN dotnet nuget add source --name itob https://git.wohlleben.dev/api/packages/itob/nuget/index.json -RUN dotnet nuget disable source "nuget.org" RUN dotnet restore "RBLNews.Web/RBLNews.Web.csproj" COPY . . WORKDIR "/src/RBLNews.Web" -- 2.43.0 From 95d5d4c39caea8f0d3cfcaae1a0e7ec7a5fa2e96 Mon Sep 17 00:00:00 2001 From: iTob Date: Fri, 20 Sep 2024 22:45:11 +0200 Subject: [PATCH 09/29] fix dockerfile --- .github/workflows/deploy.test-env.yml | 9 +++++---- IaC/RBLNews.Web/Dockerfile | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 3ff5842..43169fa 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -12,6 +12,7 @@ jobs: env: RUNNER_TOOL_CACHE: /toolcache IMAGE_NAME: rbl-news-webapp + DOCKER_CONTAINER_NAME: rbl-news-webapp-test REGISTRY: git.wohlleben.dev REPO_OWNER: itob steps: @@ -36,8 +37,8 @@ jobs: username: ${{ vars.SRV02_DOCKER_VM_USER_NAME }} key: ${{ vars.SRV02_DOCKER_VM_ROOT_USER_SSH_KEY }} script: | - docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest - docker stop rbl-news-webapp - docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker pull git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest + docker stop ${DOCKER_CONTAINER_NAME} + docker rm ${DOCKER_CONTAINER_NAME} + docker run --init -d --name ${DOCKER_CONTAINER_NAME} -p 8081:81 --build-arg docker_external_http_port=81 --restart=always git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest docker system prune -af \ No newline at end of file diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index d357437..1c8139c 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -3,6 +3,8 @@ WORKDIR /app EXPOSE 80 EXPOSE 8080 EXPOSE 443 +ARG docker_external_http_port +ENV ASPNETCORE_URLS=http://+:docker_external_http_port FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release -- 2.43.0 From c534b3ba78ac7481f4f2dfea993bfba98feb85d4 Mon Sep 17 00:00:00 2001 From: iTob Date: Sat, 21 Sep 2024 12:16:55 +0200 Subject: [PATCH 10/29] fix dockerfile --- .github/workflows/deploy.test-env.yml | 2 +- IaC/RBLNews.Web/Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 43169fa..43bc4b1 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -40,5 +40,5 @@ jobs: docker pull git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest docker stop ${DOCKER_CONTAINER_NAME} docker rm ${DOCKER_CONTAINER_NAME} - docker run --init -d --name ${DOCKER_CONTAINER_NAME} -p 8081:81 --build-arg docker_external_http_port=81 --restart=always git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest + docker run --init -d --name ${DOCKER_CONTAINER_NAME} -p 8000:80 --restart=always git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest docker system prune -af \ No newline at end of file diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index 1c8139c..6a309ec 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -3,8 +3,8 @@ WORKDIR /app EXPOSE 80 EXPOSE 8080 EXPOSE 443 -ARG docker_external_http_port -ENV ASPNETCORE_URLS=http://+:docker_external_http_port +#ARG docker_external_http_port +#ENV ASPNETCORE_URLS=http://+:docker_external_http_port FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release -- 2.43.0 From 52d68203511e307d1e6b1906c2bdb65720bb8ef4 Mon Sep 17 00:00:00 2001 From: iTob Date: Sat, 21 Sep 2024 13:14:28 +0200 Subject: [PATCH 11/29] fix dockerfile --- .github/workflows/deploy.test-env.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 43bc4b1..4e3aeda 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -37,8 +37,8 @@ jobs: username: ${{ vars.SRV02_DOCKER_VM_USER_NAME }} key: ${{ vars.SRV02_DOCKER_VM_ROOT_USER_SSH_KEY }} script: | - docker pull git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest - docker stop ${DOCKER_CONTAINER_NAME} - docker rm ${DOCKER_CONTAINER_NAME} - docker run --init -d --name ${DOCKER_CONTAINER_NAME} -p 8000:80 --restart=always git.wohlleben.dev/itob/${DOCKER_CONTAINER_NAME}:latest + docker pull git.wohlleben.dev/itob/${{DOCKER_CONTAINER_NAME}}:latest + docker stop ${{DOCKER_CONTAINER_NAME}} + docker rm ${{DOCKER_CONTAINER_NAME}} + docker run --init -d --name ${{DOCKER_CONTAINER_NAME}} -p 8000:80 --restart=always git.wohlleben.dev/itob/${{DOCKER_CONTAINER_NAME}}:latest docker system prune -af \ No newline at end of file -- 2.43.0 From 6501bfeb64e3b2a79d968991aa8a3339cbf9c90a Mon Sep 17 00:00:00 2001 From: iTob Date: Sat, 21 Sep 2024 13:20:19 +0200 Subject: [PATCH 12/29] fix dockerfile --- .github/workflows/deploy.test-env.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 4e3aeda..79ea39e 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -12,7 +12,7 @@ jobs: env: RUNNER_TOOL_CACHE: /toolcache IMAGE_NAME: rbl-news-webapp - DOCKER_CONTAINER_NAME: rbl-news-webapp-test + DOCKER_CONTAINER_NAME: rbl-news-webapp REGISTRY: git.wohlleben.dev REPO_OWNER: itob steps: @@ -37,8 +37,8 @@ jobs: username: ${{ vars.SRV02_DOCKER_VM_USER_NAME }} key: ${{ vars.SRV02_DOCKER_VM_ROOT_USER_SSH_KEY }} script: | - docker pull git.wohlleben.dev/itob/${{DOCKER_CONTAINER_NAME}}:latest - docker stop ${{DOCKER_CONTAINER_NAME}} - docker rm ${{DOCKER_CONTAINER_NAME}} - docker run --init -d --name ${{DOCKER_CONTAINER_NAME}} -p 8000:80 --restart=always git.wohlleben.dev/itob/${{DOCKER_CONTAINER_NAME}}:latest + docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest + docker stop rbl-news-webapp + docker rm rbl-news-webapp + docker run --init -d --name rbl-news-webapp -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file -- 2.43.0 From e118407c7a8a2a44b0ee979e795fb9ea2467d03c Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 13:17:09 +0200 Subject: [PATCH 13/29] fix dockerfile --- .github/workflows/deploy.test-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 79ea39e..4f40f84 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -40,5 +40,5 @@ jobs: docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file -- 2.43.0 From 0f2d4e39c86a9cfe4aac3238fa64e6efad4429f5 Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 13:26:23 +0200 Subject: [PATCH 14/29] fix dockerfile --- .github/workflows/deploy.prod-env.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index 60f8dae..61eb38d 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -23,13 +23,13 @@ jobs: username: ${{ secrets.STRATO_VPS_USER_NAME }} key: ${{ secrets.STRATO_VPS_ROOT_USER_SSH_KEY }} script: | - docker pull git.wohlleben.dev/itob/rbl-feeder-app:latest + docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker pull git.wohlleben.dev/itob/rbl-feeder-api:latest docker pull git.wohlleben.dev/itob/rbl-feeder-worker:latest docker pull git.wohlleben.dev/itob/rbl-feeder-monitoring:latest - docker stop rbl-feeder-app rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring - docker rm rbl-feeder-app rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring - docker run --init -d --name rbl-feeder-app -p 8000:80 --restart=always git.wohlleben.dev/itob/rbl-feeder-app:latest + docker stop rbl-news-webapp rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring + docker rm rbl-news-webapp rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring + docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker run --init -d --name rbl-feeder-api -p 8001:8080 -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-api:latest docker run --init -d --name rbl-feeder-monitoring -p 8002:8080 -e HostAddress=https://rbl.wohlleben.dev -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} git.wohlleben.dev/itob/rbl-feeder-monitoring:latest docker run --init -d --name rbl-feeder-worker -e HostAddress=https://rblnews.de -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-worker:latest -- 2.43.0 From 174a1e7b13d9665863f6e6ca9c6e67790296428f Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 13:42:44 +0200 Subject: [PATCH 15/29] fix dockerfile --- .github/workflows/deploy.prod-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index 61eb38d..98d0f36 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -15,7 +15,7 @@ jobs: with: registry: git.wohlleben.dev username: ${{ gitea.actor }} - password: ${{ secrets.REGISTRY_TOKEN }} + password: ${{ vars.REGISTRY_TOKEN }} - name: Restart all Docker Container on Production uses: appleboy/ssh-action@v1.0.3 with: -- 2.43.0 From 9ecc0ecfc4c3f6f21641ff86a2b0705fefbe4aa7 Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 14:03:18 +0200 Subject: [PATCH 16/29] fix dockerfile --- .github/workflows/deploy.prod-env.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index 98d0f36..079ada1 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -19,9 +19,9 @@ jobs: - name: Restart all Docker Container on Production uses: appleboy/ssh-action@v1.0.3 with: - host: ${{ secrets.STRATO_VPS_HOST_ADDRESS }} - username: ${{ secrets.STRATO_VPS_USER_NAME }} - key: ${{ secrets.STRATO_VPS_ROOT_USER_SSH_KEY }} + host: ${{ vars.STRATO_VPS_HOST_ADDRESS }} + username: ${{ vars.STRATO_VPS_USER_NAME }} + key: ${{ vars.STRATO_VPS_ROOT_USER_SSH_KEY }} script: | docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker pull git.wohlleben.dev/itob/rbl-feeder-api:latest -- 2.43.0 From 534af4073b45c7e0f9b44967a77076ddf83960af Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 15:08:05 +0200 Subject: [PATCH 17/29] fix dockerfile --- .github/workflows/deploy.prod-env.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index 079ada1..c9a214a 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -24,13 +24,7 @@ jobs: key: ${{ vars.STRATO_VPS_ROOT_USER_SSH_KEY }} script: | docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest - docker pull git.wohlleben.dev/itob/rbl-feeder-api:latest - docker pull git.wohlleben.dev/itob/rbl-feeder-worker:latest - docker pull git.wohlleben.dev/itob/rbl-feeder-monitoring:latest - docker stop rbl-news-webapp rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring - docker rm rbl-news-webapp rbl-feeder-api rbl-feeder-worker rbl-feeder-monitoring + docker stop rbl-news-webapp + docker rm rbl-news-webapp docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest - docker run --init -d --name rbl-feeder-api -p 8001:8080 -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-api:latest - docker run --init -d --name rbl-feeder-monitoring -p 8002:8080 -e HostAddress=https://rbl.wohlleben.dev -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} git.wohlleben.dev/itob/rbl-feeder-monitoring:latest - docker run --init -d --name rbl-feeder-worker -e HostAddress=https://rblnews.de -e DatabaseName=rblfeeder -e ConnectionUri=${{ secrets.DB_CONNECTION_URI_PROD_ENV }} --restart=always git.wohlleben.dev/itob/rbl-feeder-worker:latest - docker system prune -af \ No newline at end of file + docker system prune -af \ No newline at end of file -- 2.43.0 From 6246bc48248be5ceaeb97b743b64c953fd7eae79 Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 15:17:28 +0200 Subject: [PATCH 18/29] fix dockerfile --- .github/workflows/deploy.prod-env.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index c9a214a..f2fd210 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -27,4 +27,4 @@ jobs: docker stop rbl-news-webapp docker rm rbl-news-webapp docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest - docker system prune -af \ No newline at end of file + docker system prune -af \ No newline at end of file -- 2.43.0 From b8781215ae2cc14f7fd7f75fe9903e6ae6e0ed53 Mon Sep 17 00:00:00 2001 From: iTob Date: Sun, 22 Sep 2024 15:29:34 +0200 Subject: [PATCH 19/29] fix dockerfile --- RBLNews.Shared/Components/Pages/Feeds.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RBLNews.Shared/Components/Pages/Feeds.razor b/RBLNews.Shared/Components/Pages/Feeds.razor index 21fb863..111cd97 100644 --- a/RBLNews.Shared/Components/Pages/Feeds.razor +++ b/RBLNews.Shared/Components/Pages/Feeds.razor @@ -60,7 +60,7 @@ else @* *@ - @GetRssSourceName((RssFeedSources)@feed.Source) | @feed.PubDate?.ToLocalTime() + @GetRssSourceName((RssFeedSources)@feed.Source) | @feed.PubDate?.ToLocalTime().ToString("dd.MM.yyyy HH:mm") -- 2.43.0 From 50763672823c1d14c38545e4195715e7d4dbab6e Mon Sep 17 00:00:00 2001 From: iTob Date: Mon, 23 Sep 2024 12:46:09 +0200 Subject: [PATCH 20/29] read backend api url from environment variables --- .github/workflows/deploy.prod-env.yml | 2 +- .github/workflows/deploy.test-env.yml | 2 +- RBLNews.Maui/MauiProgram.cs | 15 ++++++++++- .../Services/EnvironmentVariablesService.cs | 6 +++++ RBLNews.Shared/Services/FeedDataService.cs | 10 ++++++- RBLNews.Web/Program.cs | 27 ++++++++++++++----- 6 files changed, 51 insertions(+), 11 deletions(-) create mode 100644 RBLNews.Shared/Services/EnvironmentVariablesService.cs diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index f2fd210..2339d78 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -26,5 +26,5 @@ jobs: docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker run --init -d --name rbl-news-webapp -p 8000:8080 -e RblApiUrl=${{ vars.RBL_PROD_ENV_API_URL }} --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 4f40f84..9a3990d 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -40,5 +40,5 @@ jobs: docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:8080 --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker run --init -d --name rbl-news-webapp -p 8000:8080 -e RblApiUrl=${{ vars.RBL_TEST_ENV_API_URL }} --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file diff --git a/RBLNews.Maui/MauiProgram.cs b/RBLNews.Maui/MauiProgram.cs index 3eea644..391658f 100644 --- a/RBLNews.Maui/MauiProgram.cs +++ b/RBLNews.Maui/MauiProgram.cs @@ -30,8 +30,21 @@ namespace RBLNews.Maui builder.Services.AddBlazorWebViewDeveloperTools(); builder.Logging.AddDebug(); #endif + + MauiApp app = builder.Build(); - return builder.Build(); + using var serviceScope = app.Services.CreateScope(); + var services = serviceScope.ServiceProvider; + + var environmentVariablesService = services.GetRequiredService(); + string? backendApiUrl = environmentVariablesService.RblApiUrl; + + if (string.IsNullOrEmpty(backendApiUrl)) + { + throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{backendApiUrl}'"); + } + + return app; } } } diff --git a/RBLNews.Shared/Services/EnvironmentVariablesService.cs b/RBLNews.Shared/Services/EnvironmentVariablesService.cs new file mode 100644 index 0000000..ccd8048 --- /dev/null +++ b/RBLNews.Shared/Services/EnvironmentVariablesService.cs @@ -0,0 +1,6 @@ +namespace RBLNews.Shared.Services; + +public class EnvironmentVariablesService +{ + public string? RblApiUrl => Environment.GetEnvironmentVariable("RblApiUrl"); +} \ No newline at end of file diff --git a/RBLNews.Shared/Services/FeedDataService.cs b/RBLNews.Shared/Services/FeedDataService.cs index 6a13540..4262b19 100644 --- a/RBLNews.Shared/Services/FeedDataService.cs +++ b/RBLNews.Shared/Services/FeedDataService.cs @@ -15,15 +15,23 @@ namespace RBLNews.Shared.Services public class FeedDataService : IFeedDataService { + private readonly EnvironmentVariablesService _environmentVariablesService; + private static readonly HttpClient httpClient = new(); public RssVM Feeds { get; private set; } public Action DataChanged { get; set; } + + public FeedDataService(EnvironmentVariablesService environmentVariablesService) + { + this._environmentVariablesService = environmentVariablesService; + } + public async Task LoadFeeds() { - Feeds = await httpClient.GetFromJsonAsync("https://rblnews.de/api/feeds") ?? new RssVM(); + Feeds = await httpClient.GetFromJsonAsync($"{this._environmentVariablesService.RblApiUrl}/api/feeds") ?? new RssVM(); DataChanged.Invoke(); } } diff --git a/RBLNews.Web/Program.cs b/RBLNews.Web/Program.cs index 9ca2574..91f494e 100644 --- a/RBLNews.Web/Program.cs +++ b/RBLNews.Web/Program.cs @@ -5,20 +5,33 @@ var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorComponents() - .AddInteractiveServerComponents(); + .AddInteractiveServerComponents(); builder.Services.AddBlazorBootstrap(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); +builder.Services.AddSingleton(); var app = builder.Build(); // Configure the HTTP request pipeline. if (!app.Environment.IsDevelopment()) { - app.UseExceptionHandler("/Error", createScopeForErrors: true); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); + app.UseExceptionHandler("/Error", createScopeForErrors: true); + + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +using var serviceScope = app.Services.CreateScope(); +IServiceProvider services = serviceScope.ServiceProvider; + +EnvironmentVariablesService environmentVariablesService = services.GetRequiredService(); +string? backendApiUrl = environmentVariablesService.RblApiUrl; + +if (string.IsNullOrEmpty(backendApiUrl)) +{ + throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{backendApiUrl}'"); } app.UseHttpsRedirection(); @@ -27,7 +40,7 @@ app.UseStaticFiles(); app.UseAntiforgery(); app.MapRazorComponents() - .AddInteractiveServerRenderMode() - .AddAdditionalAssemblies(typeof(RBLNews.Shared._Imports).Assembly); + .AddInteractiveServerRenderMode() + .AddAdditionalAssemblies(typeof( RBLNews.Shared._Imports ).Assembly); -app.Run(); +app.Run(); \ No newline at end of file -- 2.43.0 From eaadb9615757d76bf37863a50ffa6b7cdb9a0f63 Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Mon, 23 Sep 2024 13:40:00 +0200 Subject: [PATCH 21/29] badge for switch implemented --- .../Components/Controls/SwitchWithBadge.razor | 49 +++---- .../Controls/SwitchWithBadge.razor.css | 1 + RBLNews.Shared/Components/Pages/Feeds.razor | 4 +- RBLNews.Shared/wwwroot/css/app.css | 120 +++++++++++------- 4 files changed, 102 insertions(+), 72 deletions(-) create mode 100644 RBLNews.Shared/Components/Controls/SwitchWithBadge.razor.css diff --git a/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor b/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor index 6fd9366..ab48048 100644 --- a/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor +++ b/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor @@ -1,39 +1,40 @@ @using RBLFeederCommon.Enums @using RBLNews.Shared.Models - +
+ + @(this.Count) +
@code { private bool _filter = true; - - [Parameter] - public RssFeedSources Source { get; set; } - - [Parameter] - public string Text { get; set; } = ""; - - [Parameter] - public bool ShowCount { get; set; } - - [Parameter] - public int Count { get; set; } - - [Parameter] - public EventCallback OnFilterChanged { get; set; } - + + [Parameter] public RssFeedSources Source { get; set; } + + [Parameter] public string Text { get; set; } = ""; + + [Parameter] public bool ShowCount { get; set; } + + [Parameter] public int Count { get; set; } + + [Parameter] public EventCallback OnFilterChanged { get; set; } + + Task SwitchChanged(bool value) { this._filter = value; - - OnFilterChanged.InvokeAsync(new FilterFeedEventArg - { - Source = this.Source, - Value = value - }); - + + OnFilterChanged.InvokeAsync( + new FilterFeedEventArg + { + Source = this.Source, + Value = value + }); + return Task.CompletedTask; } + } \ No newline at end of file diff --git a/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor.css b/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor.css new file mode 100644 index 0000000..5f28270 --- /dev/null +++ b/RBLNews.Shared/Components/Controls/SwitchWithBadge.razor.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/RBLNews.Shared/Components/Pages/Feeds.razor b/RBLNews.Shared/Components/Pages/Feeds.razor index 111cd97..2e763dc 100644 --- a/RBLNews.Shared/Components/Pages/Feeds.razor +++ b/RBLNews.Shared/Components/Pages/Feeds.razor @@ -37,9 +37,9 @@ else
@foreach (FeedGroupVM feedGrp in FeedGroups) { -

+

@feedGrp.PublishDate.ToLocalTime().ToString("dd.MM.yyyy") -

+ @foreach (FeedVM feed in feedGrp.Feeds) {
diff --git a/RBLNews.Shared/wwwroot/css/app.css b/RBLNews.Shared/wwwroot/css/app.css index 472d329..dbed1f9 100644 --- a/RBLNews.Shared/wwwroot/css/app.css +++ b/RBLNews.Shared/wwwroot/css/app.css @@ -3,6 +3,10 @@ rot: #DD0741 schrift: #4b4b4b */ +body { + color: #4b4b4b; +} + @font-face { font-family: "Nanum Myeongjo", serif !important; font-weight: 400; @@ -13,6 +17,13 @@ schrift: #4b4b4b #feeds-page { color: #4b4b4b; } +#feeds-list { + margin-top: 15px; +} + +#filter { + margin-top: 15px; +} .card { color: #4b4b4b; @@ -31,20 +42,21 @@ schrift: #4b4b4b font-size: 0.8em; } -nav .container-fluid { +.container-fluid { padding-right: 0 !important; padding-left: 0 !important; } + nav .top-row { height: 1.8rem; background-color: rgb(221, 7, 65); color: #eee; } - /*nav .top-row h1, h2, h3, h4, h5 {*/ - /* color: #eee;*/ - /*}*/ +/*nav .top-row h1, h2, h3, h4, h5 {*/ +/* color: #eee;*/ +/*}*/ #filter button { @@ -59,21 +71,20 @@ nav .top-row { /*}*/ .btn-primary { - color: #fff; + color: #eee; background-color: #f75581; border-color: #DD0741; } .btn-primary:hover { - color: inherit; background-color: inherit; - border-color: inherit; + border-color: #4b4b4b; } .btn-outline-primary { - color: #f75581; + color: #4b4b4b; background-color: #fff; - border-color: #DD0741; + border-color: #4b4b4b; } .btn-outline-primary:hover { @@ -102,10 +113,9 @@ nav .top-row { background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1); } - .navbar-toggler:checked { - background-color: rgba(255, 255, 255, 0.5); - } - +.navbar-toggler:checked { + background-color: rgba(255, 255, 255, 0.5); +} .navbar-brand { @@ -139,32 +149,32 @@ nav .top-row { padding-bottom: 0.6rem; } - .nav-item:first-of-type { - padding-top: 1rem; - } +.nav-item:first-of-type { + padding-top: 1rem; +} - .nav-item:last-of-type { - padding-bottom: 1rem; - } +.nav-item:last-of-type { + padding-bottom: 1rem; +} - .nav-item ::deep a { - color: #d7d7d7; - border-radius: 4px; - height: 3rem; - display: flex; - align-items: center; - line-height: 3rem; - } +.nav-item ::deep a { + color: #d7d7d7; + border-radius: 4px; + height: 3rem; + display: flex; + align-items: center; + line-height: 3rem; +} - .nav-item ::deep a.active { - background-color: rgba(255,255,255,0.37); - color: white; - } +.nav-item ::deep a.active { + background-color: rgba(255, 255, 255, 0.37); + color: white; +} - .nav-item ::deep a:hover { - background-color: rgba(255,255,255,0.1); - color: white; - } +.nav-item ::deep a:hover { + background-color: rgba(255, 255, 255, 0.1); + color: white; +} .nav-scrollable { display: none; @@ -189,8 +199,6 @@ nav .top-row { } - - .loading { position: absolute; top: 45%; @@ -226,12 +234,12 @@ nav .top-row { z-index: 1000; } - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } +#blazor-error-ui .dismiss { + cursor: pointer; + position: absolute; + right: 0.75rem; + top: 0.5rem; +} .blazor-error-boundary { background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; @@ -239,9 +247,9 @@ nav .top-row { color: white; } - .blazor-error-boundary::after { - content: "An error has occurred." - } +.blazor-error-boundary::after { + content: "An error has occurred." +} .status-bar-safe-area { display: none; @@ -263,6 +271,26 @@ nav .top-row { } } +.swb-container { + position: relative; + padding-top: 10px; +} + +.swb-badge { + position: absolute; + top: -5px; + /*height:20px;*/ + min-width: 20px; + z-index: 999; + background-color: #DD0741; + display: inline-block; + margin: 8px 2px; + border-radius: 18px; + text-align: center; + font-size: 0.7em; + color: #eee; +} + /*html, body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -- 2.43.0 From aa03b6ae8394cc382973ca08dee26174fc0c3807 Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Tue, 24 Sep 2024 14:57:27 +0200 Subject: [PATCH 22/29] umbau auf enviroment appsettings --- .github/workflows/deploy.test-env.yml | 1 - RBLNews.Maui/MauiProgram.cs.orig | 44 ---------------------- RBLNews.Web/Components/App.razor.orig | 33 ---------------- RBLNews.Web/Models/AppSettingsModel.cs | 6 +++ RBLNews.Web/Program.cs | 11 ++++++ RBLNews.Web/Program.cs.orig | 36 ------------------ RBLNews.Web/Properties/launchSettings.json | 11 +++++- RBLNews.Web/Services/ConfigService.cs | 18 +++++++++ RBLNews.Web/appsettings.Development.json | 3 ++ RBLNews.Web/appsettings.Production.json | 12 ++++++ RBLNews.Web/appsettings.json | 5 ++- 11 files changed, 64 insertions(+), 116 deletions(-) delete mode 100644 RBLNews.Maui/MauiProgram.cs.orig delete mode 100644 RBLNews.Web/Components/App.razor.orig create mode 100644 RBLNews.Web/Models/AppSettingsModel.cs delete mode 100644 RBLNews.Web/Program.cs.orig create mode 100644 RBLNews.Web/Services/ConfigService.cs create mode 100644 RBLNews.Web/appsettings.Production.json diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index 9a3990d..d53d4b2 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -12,7 +12,6 @@ jobs: env: RUNNER_TOOL_CACHE: /toolcache IMAGE_NAME: rbl-news-webapp - DOCKER_CONTAINER_NAME: rbl-news-webapp REGISTRY: git.wohlleben.dev REPO_OWNER: itob steps: diff --git a/RBLNews.Maui/MauiProgram.cs.orig b/RBLNews.Maui/MauiProgram.cs.orig deleted file mode 100644 index 04667d8..0000000 --- a/RBLNews.Maui/MauiProgram.cs.orig +++ /dev/null @@ -1,44 +0,0 @@ -using CommunityToolkit.Maui; -using CommunityToolkit.Maui.Markup; -using Microsoft.Extensions.Logging; -using RBLNews.Shared.Services; - -namespace RBLNews.Maui -{ - public static class MauiProgram - { - public static MauiApp CreateMauiApp() - { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .UseMauiCommunityToolkit() - .UseMauiCommunityToolkitMarkup() - .ConfigureFonts(fonts => - { - //fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - fonts.AddFont("NanumMyeongjo-Regular.ttf", "NanumMyeongjoRegular"); - }); - - builder.Services.AddMauiBlazorWebView(); -<<<<<<< HEAD - -#if DEBUG - builder.Services.AddBlazorWebViewDeveloperTools(); - builder.Logging.AddDebug(); -======= - builder.Services.AddBlazorBootstrap(); - - builder.Services.AddSingleton(); - builder.Services.AddSingleton(); - -#if DEBUG - builder.Services.AddBlazorWebViewDeveloperTools(); - builder.Logging.AddDebug(); ->>>>>>> css_bootstrap_blazor -#endif - - return builder.Build(); - } - } -} diff --git a/RBLNews.Web/Components/App.razor.orig b/RBLNews.Web/Components/App.razor.orig deleted file mode 100644 index 76ed369..0000000 --- a/RBLNews.Web/Components/App.razor.orig +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - @* *@ - - @* *@ - @* *@ - - - - - - -<<<<<<< HEAD -======= - - - - - - - ->>>>>>> css_bootstrap_blazor - - - - diff --git a/RBLNews.Web/Models/AppSettingsModel.cs b/RBLNews.Web/Models/AppSettingsModel.cs new file mode 100644 index 0000000..53e9c38 --- /dev/null +++ b/RBLNews.Web/Models/AppSettingsModel.cs @@ -0,0 +1,6 @@ +namespace RBLNews.Web.Models; + +public class AppSettingsModel +{ + public string BackendApiUrl { get; set; } +} \ No newline at end of file diff --git a/RBLNews.Web/Program.cs b/RBLNews.Web/Program.cs index 91f494e..dfa915d 100644 --- a/RBLNews.Web/Program.cs +++ b/RBLNews.Web/Program.cs @@ -1,5 +1,6 @@ using RBLNews.Shared.Services; using RBLNews.Web.Components; +using RBLNews.Web.Services; var builder = WebApplication.CreateBuilder(args); @@ -11,6 +12,7 @@ builder.Services.AddBlazorBootstrap(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); +builder.Services.AddSingleton(); var app = builder.Build(); @@ -26,6 +28,15 @@ if (!app.Environment.IsDevelopment()) using var serviceScope = app.Services.CreateScope(); IServiceProvider services = serviceScope.ServiceProvider; +var logger = LoggerFactory.Create(config => +{ + config.AddConsole(); +}).CreateLogger("Program"); + + +ConfigService configService = services.GetRequiredService(); +var a = configService.AppSettings; + EnvironmentVariablesService environmentVariablesService = services.GetRequiredService(); string? backendApiUrl = environmentVariablesService.RblApiUrl; diff --git a/RBLNews.Web/Program.cs.orig b/RBLNews.Web/Program.cs.orig deleted file mode 100644 index 761c4fa..0000000 --- a/RBLNews.Web/Program.cs.orig +++ /dev/null @@ -1,36 +0,0 @@ -using RBLNews.Shared.Services; -using RBLNews.Web.Components; - -var builder = WebApplication.CreateBuilder(args); - -// Add services to the container. -builder.Services.AddRazorComponents() - .AddInteractiveServerComponents(); -<<<<<<< HEAD -======= -builder.Services.AddBlazorBootstrap(); - -builder.Services.AddSingleton(); -builder.Services.AddSingleton(); ->>>>>>> css_bootstrap_blazor - -var app = builder.Build(); - -// Configure the HTTP request pipeline. -if (!app.Environment.IsDevelopment()) -{ - app.UseExceptionHandler("/Error", createScopeForErrors: true); - // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. - app.UseHsts(); -} - -app.UseHttpsRedirection(); - -app.UseStaticFiles(); -app.UseAntiforgery(); - -app.MapRazorComponents() - .AddInteractiveServerRenderMode() - .AddAdditionalAssemblies(typeof(RBLNews.Shared._Imports).Assembly); - -app.Run(); diff --git a/RBLNews.Web/Properties/launchSettings.json b/RBLNews.Web/Properties/launchSettings.json index d0779f2..b5991ff 100644 --- a/RBLNews.Web/Properties/launchSettings.json +++ b/RBLNews.Web/Properties/launchSettings.json @@ -18,7 +18,7 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, - "https": { + "https (DEV)": { "commandName": "Project", "dotnetRunMessages": true, "launchBrowser": true, @@ -27,6 +27,15 @@ "ASPNETCORE_ENVIRONMENT": "Development" } }, + "https (PROD)": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7158;http://localhost:5289", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Production" + } + }, "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, diff --git a/RBLNews.Web/Services/ConfigService.cs b/RBLNews.Web/Services/ConfigService.cs new file mode 100644 index 0000000..3cf60fd --- /dev/null +++ b/RBLNews.Web/Services/ConfigService.cs @@ -0,0 +1,18 @@ +using RBLNews.Web.Models; + +namespace RBLNews.Web.Services; + +public class ConfigService +{ + private readonly IConfiguration _configuration; + + public AppSettingsModel AppSettings { get; private set; } + + public ConfigService(IConfiguration configuration) + { + this._configuration = configuration; + configuration.GetSection("App").Bind(this.AppSettings); + + AppSettings = configuration.GetSection("App").Get(); + } +} \ No newline at end of file diff --git a/RBLNews.Web/appsettings.Development.json b/RBLNews.Web/appsettings.Development.json index 0c208ae..af54d1e 100644 --- a/RBLNews.Web/appsettings.Development.json +++ b/RBLNews.Web/appsettings.Development.json @@ -4,5 +4,8 @@ "Default": "Information", "Microsoft.AspNetCore": "Warning" } + }, + "App": { + "BackendApiUrl": "https://rbl.wohlleben.dev" } } diff --git a/RBLNews.Web/appsettings.Production.json b/RBLNews.Web/appsettings.Production.json new file mode 100644 index 0000000..0c2c7dc --- /dev/null +++ b/RBLNews.Web/appsettings.Production.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rblnews.de" + } +} diff --git a/RBLNews.Web/appsettings.json b/RBLNews.Web/appsettings.json index 10f68b8..0c2c7dc 100644 --- a/RBLNews.Web/appsettings.json +++ b/RBLNews.Web/appsettings.json @@ -5,5 +5,8 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rblnews.de" + } } -- 2.43.0 From 20f9454f80e97de04f9151f0cad61b7721bd47ea Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Tue, 24 Sep 2024 22:31:15 +0200 Subject: [PATCH 23/29] umbau auf enviroment appsettings --- .../Models/AppSettingsModel.cs | 2 +- .../Services/Contracts/IConfigService.cs | 8 +++++++ RBLNews.Shared/Services/FeedDataService.cs | 11 +++++---- RBLNews.Web/Program.cs | 24 +++++-------------- RBLNews.Web/Services/ConfigService.cs | 14 +++++------ RBLNews.Web/appsettings.Development.json | 2 +- RBLNews.Web/appsettings.Test.json | 12 ++++++++++ RBLNews.Web/appsettings.json | 5 +--- 8 files changed, 41 insertions(+), 37 deletions(-) rename {RBLNews.Web => RBLNews.Shared}/Models/AppSettingsModel.cs (69%) create mode 100644 RBLNews.Shared/Services/Contracts/IConfigService.cs create mode 100644 RBLNews.Web/appsettings.Test.json diff --git a/RBLNews.Web/Models/AppSettingsModel.cs b/RBLNews.Shared/Models/AppSettingsModel.cs similarity index 69% rename from RBLNews.Web/Models/AppSettingsModel.cs rename to RBLNews.Shared/Models/AppSettingsModel.cs index 53e9c38..24d434a 100644 --- a/RBLNews.Web/Models/AppSettingsModel.cs +++ b/RBLNews.Shared/Models/AppSettingsModel.cs @@ -1,4 +1,4 @@ -namespace RBLNews.Web.Models; +namespace RBLNews.Shared.Models; public class AppSettingsModel { diff --git a/RBLNews.Shared/Services/Contracts/IConfigService.cs b/RBLNews.Shared/Services/Contracts/IConfigService.cs new file mode 100644 index 0000000..1a07ef1 --- /dev/null +++ b/RBLNews.Shared/Services/Contracts/IConfigService.cs @@ -0,0 +1,8 @@ +using RBLNews.Shared.Models; + +namespace RBLNews.Shared.Services.Contracts; + +public interface IConfigService +{ + AppSettingsModel AppSettings { get; } +} \ No newline at end of file diff --git a/RBLNews.Shared/Services/FeedDataService.cs b/RBLNews.Shared/Services/FeedDataService.cs index 4262b19..baa645b 100644 --- a/RBLNews.Shared/Services/FeedDataService.cs +++ b/RBLNews.Shared/Services/FeedDataService.cs @@ -2,6 +2,8 @@ using System.Net.Http.Json; using RBLFeederCommon.Models.RssFeed; +using RBLNews.Shared.Services.Contracts; + namespace RBLNews.Shared.Services { public interface IFeedDataService @@ -15,7 +17,7 @@ namespace RBLNews.Shared.Services public class FeedDataService : IFeedDataService { - private readonly EnvironmentVariablesService _environmentVariablesService; + private readonly IConfigService _configService; private static readonly HttpClient httpClient = new(); @@ -23,15 +25,14 @@ namespace RBLNews.Shared.Services public Action DataChanged { get; set; } - - public FeedDataService(EnvironmentVariablesService environmentVariablesService) + public FeedDataService(IConfigService configService) { - this._environmentVariablesService = environmentVariablesService; + this._configService = configService; } public async Task LoadFeeds() { - Feeds = await httpClient.GetFromJsonAsync($"{this._environmentVariablesService.RblApiUrl}/api/feeds") ?? new RssVM(); + Feeds = await httpClient.GetFromJsonAsync($"{this._configService.AppSettings.BackendApiUrl}/api/feeds") ?? new RssVM(); DataChanged.Invoke(); } } diff --git a/RBLNews.Web/Program.cs b/RBLNews.Web/Program.cs index dfa915d..119fa32 100644 --- a/RBLNews.Web/Program.cs +++ b/RBLNews.Web/Program.cs @@ -1,4 +1,6 @@ +using RBLNews.Shared.Models; using RBLNews.Shared.Services; +using RBLNews.Shared.Services.Contracts; using RBLNews.Web.Components; using RBLNews.Web.Services; @@ -9,10 +11,9 @@ builder.Services.AddRazorComponents() .AddInteractiveServerComponents(); builder.Services.AddBlazorBootstrap(); +builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); -builder.Services.AddSingleton(); -builder.Services.AddSingleton(); var app = builder.Build(); @@ -25,24 +26,11 @@ if (!app.Environment.IsDevelopment()) app.UseHsts(); } -using var serviceScope = app.Services.CreateScope(); -IServiceProvider services = serviceScope.ServiceProvider; +AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get(); -var logger = LoggerFactory.Create(config => +if (string.IsNullOrEmpty(appSettings?.BackendApiUrl)) { - config.AddConsole(); -}).CreateLogger("Program"); - - -ConfigService configService = services.GetRequiredService(); -var a = configService.AppSettings; - -EnvironmentVariablesService environmentVariablesService = services.GetRequiredService(); -string? backendApiUrl = environmentVariablesService.RblApiUrl; - -if (string.IsNullOrEmpty(backendApiUrl)) -{ - throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{backendApiUrl}'"); + throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); } app.UseHttpsRedirection(); diff --git a/RBLNews.Web/Services/ConfigService.cs b/RBLNews.Web/Services/ConfigService.cs index 3cf60fd..edd0d47 100644 --- a/RBLNews.Web/Services/ConfigService.cs +++ b/RBLNews.Web/Services/ConfigService.cs @@ -1,18 +1,16 @@ -using RBLNews.Web.Models; +using RBLNews.Shared.Models; +using RBLNews.Shared.Services.Contracts; namespace RBLNews.Web.Services; -public class ConfigService +public class ConfigService : IConfigService { - private readonly IConfiguration _configuration; - - public AppSettingsModel AppSettings { get; private set; } + public AppSettingsModel AppSettings { get; } public ConfigService(IConfiguration configuration) { - this._configuration = configuration; - configuration.GetSection("App").Bind(this.AppSettings); - AppSettings = configuration.GetSection("App").Get(); + if(this.AppSettings == null) + throw new NullReferenceException("App settings not found"); } } \ No newline at end of file diff --git a/RBLNews.Web/appsettings.Development.json b/RBLNews.Web/appsettings.Development.json index af54d1e..7a608cd 100644 --- a/RBLNews.Web/appsettings.Development.json +++ b/RBLNews.Web/appsettings.Development.json @@ -6,6 +6,6 @@ } }, "App": { - "BackendApiUrl": "https://rbl.wohlleben.dev" + "BackendApiUrl": "https://localhost:5147" } } diff --git a/RBLNews.Web/appsettings.Test.json b/RBLNews.Web/appsettings.Test.json new file mode 100644 index 0000000..8ceaf0e --- /dev/null +++ b/RBLNews.Web/appsettings.Test.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rbl.wohlleben.dev" + } +} diff --git a/RBLNews.Web/appsettings.json b/RBLNews.Web/appsettings.json index 0c2c7dc..10f68b8 100644 --- a/RBLNews.Web/appsettings.json +++ b/RBLNews.Web/appsettings.json @@ -5,8 +5,5 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", - "App": { - "BackendApiUrl": "https://rblnews.de" - } + "AllowedHosts": "*" } -- 2.43.0 From c7f81e2172b55ae5c463a489e7370c58676fa5df Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Tue, 24 Sep 2024 22:53:19 +0200 Subject: [PATCH 24/29] umbau auf enviroment appsettings --- .github/workflows/deploy.prod-env.yml | 2 +- .github/workflows/deploy.test-env.yml | 2 +- IaC/RBLNews.Web/Dockerfile | 3 --- RBLNews.Shared/RBLNews.Shared.csproj | 15 +++++++++++++++ .../wwwroot}/appsettings.Development.json | 0 .../wwwroot}/appsettings.Production.json | 0 .../wwwroot}/appsettings.Test.json | 0 .../wwwroot}/appsettings.json | 0 RBLNews.Web/Program.cs | 3 +++ RBLNews.Web/Properties/launchSettings.json | 13 +++++++++++-- RBLNews.Web/RBLNews.Web.csproj | 12 ++++++++++++ 11 files changed, 43 insertions(+), 7 deletions(-) rename {RBLNews.Web => RBLNews.Shared/wwwroot}/appsettings.Development.json (100%) rename {RBLNews.Web => RBLNews.Shared/wwwroot}/appsettings.Production.json (100%) rename {RBLNews.Web => RBLNews.Shared/wwwroot}/appsettings.Test.json (100%) rename {RBLNews.Web => RBLNews.Shared/wwwroot}/appsettings.json (100%) diff --git a/.github/workflows/deploy.prod-env.yml b/.github/workflows/deploy.prod-env.yml index 2339d78..5033a53 100644 --- a/.github/workflows/deploy.prod-env.yml +++ b/.github/workflows/deploy.prod-env.yml @@ -26,5 +26,5 @@ jobs: docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:8080 -e RblApiUrl=${{ vars.RBL_PROD_ENV_API_URL }} --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker run --init -d --name rbl-news-webapp -p 8000:8080 -e ASPNETCORE_ENVIRONMENT=Production --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file diff --git a/.github/workflows/deploy.test-env.yml b/.github/workflows/deploy.test-env.yml index d53d4b2..4e4327b 100644 --- a/.github/workflows/deploy.test-env.yml +++ b/.github/workflows/deploy.test-env.yml @@ -39,5 +39,5 @@ jobs: docker pull git.wohlleben.dev/itob/rbl-news-webapp:latest docker stop rbl-news-webapp docker rm rbl-news-webapp - docker run --init -d --name rbl-news-webapp -p 8000:8080 -e RblApiUrl=${{ vars.RBL_TEST_ENV_API_URL }} --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest + docker run --init -d --name rbl-news-webapp -p 8000:8080 -e ASPNETCORE_ENVIRONMENT=Test --restart=always git.wohlleben.dev/itob/rbl-news-webapp:latest docker system prune -af \ No newline at end of file diff --git a/IaC/RBLNews.Web/Dockerfile b/IaC/RBLNews.Web/Dockerfile index 6a309ec..d8f7f22 100644 --- a/IaC/RBLNews.Web/Dockerfile +++ b/IaC/RBLNews.Web/Dockerfile @@ -3,9 +3,6 @@ WORKDIR /app EXPOSE 80 EXPOSE 8080 EXPOSE 443 -#ARG docker_external_http_port -#ENV ASPNETCORE_URLS=http://+:docker_external_http_port - FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build ARG BUILD_CONFIGURATION=Release WORKDIR /src diff --git a/RBLNews.Shared/RBLNews.Shared.csproj b/RBLNews.Shared/RBLNews.Shared.csproj index b6d1027..ea85a54 100644 --- a/RBLNews.Shared/RBLNews.Shared.csproj +++ b/RBLNews.Shared/RBLNews.Shared.csproj @@ -20,4 +20,19 @@ + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + diff --git a/RBLNews.Web/appsettings.Development.json b/RBLNews.Shared/wwwroot/appsettings.Development.json similarity index 100% rename from RBLNews.Web/appsettings.Development.json rename to RBLNews.Shared/wwwroot/appsettings.Development.json diff --git a/RBLNews.Web/appsettings.Production.json b/RBLNews.Shared/wwwroot/appsettings.Production.json similarity index 100% rename from RBLNews.Web/appsettings.Production.json rename to RBLNews.Shared/wwwroot/appsettings.Production.json diff --git a/RBLNews.Web/appsettings.Test.json b/RBLNews.Shared/wwwroot/appsettings.Test.json similarity index 100% rename from RBLNews.Web/appsettings.Test.json rename to RBLNews.Shared/wwwroot/appsettings.Test.json diff --git a/RBLNews.Web/appsettings.json b/RBLNews.Shared/wwwroot/appsettings.json similarity index 100% rename from RBLNews.Web/appsettings.json rename to RBLNews.Shared/wwwroot/appsettings.json diff --git a/RBLNews.Web/Program.cs b/RBLNews.Web/Program.cs index 119fa32..38aa526 100644 --- a/RBLNews.Web/Program.cs +++ b/RBLNews.Web/Program.cs @@ -15,6 +15,9 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); +// required for production +builder.WebHost.UseStaticWebAssets(); + var app = builder.Build(); // Configure the HTTP request pipeline. diff --git a/RBLNews.Web/Properties/launchSettings.json b/RBLNews.Web/Properties/launchSettings.json index b5991ff..42b81b2 100644 --- a/RBLNews.Web/Properties/launchSettings.json +++ b/RBLNews.Web/Properties/launchSettings.json @@ -21,16 +21,25 @@ "https (DEV)": { "commandName": "Project", "dotnetRunMessages": true, - "launchBrowser": true, + "launchBrowser": false, "applicationUrl": "https://localhost:7158;http://localhost:5289", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, + "https (TEST)": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": false, + "applicationUrl": "https://localhost:7158;http://localhost:5289", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Test" + } + }, "https (PROD)": { "commandName": "Project", "dotnetRunMessages": true, - "launchBrowser": true, + "launchBrowser": false, "applicationUrl": "https://localhost:7158;http://localhost:5289", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Production" diff --git a/RBLNews.Web/RBLNews.Web.csproj b/RBLNews.Web/RBLNews.Web.csproj index a259a0c..baee8a5 100644 --- a/RBLNews.Web/RBLNews.Web.csproj +++ b/RBLNews.Web/RBLNews.Web.csproj @@ -19,6 +19,18 @@ Always + + appsettings.Development.json + + + appsettings.json + + + appsettings.Production.json + + + appsettings.Test.json + -- 2.43.0 From 18fd6d6f5972b5923ba8980a4b82fcedc856ba78 Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Tue, 24 Sep 2024 23:13:52 +0200 Subject: [PATCH 25/29] umbau auf enviroment appsettings --- RBLNews.Maui/MauiProgram.cs | 20 ++++++++++--------- RBLNews.Maui/RBLNews.Maui.csproj | 15 ++++++++++++++ RBLNews.Maui/Services/ConfigService.cs | 20 +++++++++++++++++++ .../Services/Contracts/IConfigService.cs | 2 +- RBLNews.Web/Services/ConfigService.cs | 2 +- 5 files changed, 48 insertions(+), 11 deletions(-) create mode 100644 RBLNews.Maui/Services/ConfigService.cs diff --git a/RBLNews.Maui/MauiProgram.cs b/RBLNews.Maui/MauiProgram.cs index 391658f..c676649 100644 --- a/RBLNews.Maui/MauiProgram.cs +++ b/RBLNews.Maui/MauiProgram.cs @@ -1,7 +1,13 @@ using CommunityToolkit.Maui; using CommunityToolkit.Maui.Markup; + +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; + +using RBLNews.Maui.Services; +using RBLNews.Shared.Models; using RBLNews.Shared.Services; +using RBLNews.Shared.Services.Contracts; namespace RBLNews.Maui { @@ -22,7 +28,7 @@ namespace RBLNews.Maui builder.Services.AddMauiBlazorWebView(); builder.Services.AddBlazorBootstrap(); - + builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton(); @@ -33,17 +39,13 @@ namespace RBLNews.Maui MauiApp app = builder.Build(); - using var serviceScope = app.Services.CreateScope(); - var services = serviceScope.ServiceProvider; + AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get(); - var environmentVariablesService = services.GetRequiredService(); - string? backendApiUrl = environmentVariablesService.RblApiUrl; - - if (string.IsNullOrEmpty(backendApiUrl)) + if (string.IsNullOrEmpty(appSettings?.BackendApiUrl)) { - throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{backendApiUrl}'"); + throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); } - + return app; } } diff --git a/RBLNews.Maui/RBLNews.Maui.csproj b/RBLNews.Maui/RBLNews.Maui.csproj index bdcb172..9e9fc0d 100644 --- a/RBLNews.Maui/RBLNews.Maui.csproj +++ b/RBLNews.Maui/RBLNews.Maui.csproj @@ -90,6 +90,21 @@ + + + wwwroot\appsettings.Development.json + + + wwwroot\appsettings.json + + + wwwroot\appsettings.Production.json + + + wwwroot\appsettings.Test.json + + + diff --git a/RBLNews.Maui/Services/ConfigService.cs b/RBLNews.Maui/Services/ConfigService.cs new file mode 100644 index 0000000..09571c9 --- /dev/null +++ b/RBLNews.Maui/Services/ConfigService.cs @@ -0,0 +1,20 @@ +using Microsoft.Extensions.Configuration; + +using RBLNews.Shared.Models; +using RBLNews.Shared.Services.Contracts; + +namespace RBLNews.Maui.Services; + +public class ConfigService : IConfigService +{ + public AppSettingsModel? AppSettings { get; } + + public ConfigService(IConfiguration configuration) + { + this.AppSettings = configuration.GetSection("App").Get(); + if(this.AppSettings == null) + { + throw new NullReferenceException("App settings not found"); + } + } +} \ No newline at end of file diff --git a/RBLNews.Shared/Services/Contracts/IConfigService.cs b/RBLNews.Shared/Services/Contracts/IConfigService.cs index 1a07ef1..b92b96c 100644 --- a/RBLNews.Shared/Services/Contracts/IConfigService.cs +++ b/RBLNews.Shared/Services/Contracts/IConfigService.cs @@ -4,5 +4,5 @@ namespace RBLNews.Shared.Services.Contracts; public interface IConfigService { - AppSettingsModel AppSettings { get; } + AppSettingsModel? AppSettings { get; } } \ No newline at end of file diff --git a/RBLNews.Web/Services/ConfigService.cs b/RBLNews.Web/Services/ConfigService.cs index edd0d47..bff176c 100644 --- a/RBLNews.Web/Services/ConfigService.cs +++ b/RBLNews.Web/Services/ConfigService.cs @@ -5,7 +5,7 @@ namespace RBLNews.Web.Services; public class ConfigService : IConfigService { - public AppSettingsModel AppSettings { get; } + public AppSettingsModel? AppSettings { get; } public ConfigService(IConfiguration configuration) { -- 2.43.0 From 2b74f17012636a1a75d73bd4e90594e5f8509710 Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Wed, 25 Sep 2024 10:57:23 +0200 Subject: [PATCH 26/29] umbau auf enviroment appsettings --- .../.idea/deploymentTargetSelector.xml | 8 ++++ RBLNews.Maui/App.xaml.cs | 4 +- RBLNews.Maui/MainPage.xaml.cs | 6 ++- RBLNews.Maui/MauiProgram.cs | 17 ++++--- RBLNews.Maui/RBLNews.Maui.csproj | 45 +++++++++++-------- RBLNews.Maui/appsettings.Development.json | 11 +++++ RBLNews.Maui/appsettings.Production.json | 12 +++++ RBLNews.Maui/appsettings.Test.json | 12 +++++ RBLNews.Maui/appsettings.json | 9 ++++ RBLNews.Shared/Component1.razor | 3 -- RBLNews.Shared/Component1.razor.css | 6 --- RBLNews.Shared/RBLNews.Shared.csproj | 37 ++++++++++----- RBLNews.Shared/RBLNews.Shared.csproj.orig | 26 ----------- RBLNews.Shared/Services/FeedDataService.cs | 2 +- RBLNews.Shared/_Imports.razor.BASE | 4 -- RBLNews.Shared/_Imports.razor.LOCAL | 1 - RBLNews.Shared/_Imports.razor.REMOTE | 4 -- RBLNews.Shared/_Imports.razor.orig | 8 ---- RBLNews.Web/RBLNews.Web.csproj | 4 ++ 19 files changed, 128 insertions(+), 91 deletions(-) create mode 100644 RBLNews.Maui/appsettings.Development.json create mode 100644 RBLNews.Maui/appsettings.Production.json create mode 100644 RBLNews.Maui/appsettings.Test.json create mode 100644 RBLNews.Maui/appsettings.json delete mode 100644 RBLNews.Shared/Component1.razor delete mode 100644 RBLNews.Shared/Component1.razor.css delete mode 100644 RBLNews.Shared/RBLNews.Shared.csproj.orig delete mode 100644 RBLNews.Shared/_Imports.razor.BASE delete mode 100644 RBLNews.Shared/_Imports.razor.LOCAL delete mode 100644 RBLNews.Shared/_Imports.razor.REMOTE delete mode 100644 RBLNews.Shared/_Imports.razor.orig diff --git a/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml b/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml index ae67e8f..214e5b9 100644 --- a/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml +++ b/.idea/.idea.RBLNews/.idea/deploymentTargetSelector.xml @@ -4,6 +4,14 @@ diff --git a/RBLNews.Maui/App.xaml.cs b/RBLNews.Maui/App.xaml.cs index 90e3f64..7ea2a02 100644 --- a/RBLNews.Maui/App.xaml.cs +++ b/RBLNews.Maui/App.xaml.cs @@ -1,4 +1,6 @@ -using Microsoft.Maui.Controls.PlatformConfiguration; +using Microsoft.Maui; +using Microsoft.Maui.Controls; + using RBLNews.Shared.Services; namespace RBLNews.Maui diff --git a/RBLNews.Maui/MainPage.xaml.cs b/RBLNews.Maui/MainPage.xaml.cs index 0e4e1ba..c8d7337 100644 --- a/RBLNews.Maui/MainPage.xaml.cs +++ b/RBLNews.Maui/MainPage.xaml.cs @@ -1,4 +1,8 @@ -using RBLNews.Shared.Components.Pages; +using System; + +using Microsoft.Maui.Controls; + +using RBLNews.Shared.Components.Pages; namespace RBLNews.Maui { diff --git a/RBLNews.Maui/MauiProgram.cs b/RBLNews.Maui/MauiProgram.cs index c676649..dda7c91 100644 --- a/RBLNews.Maui/MauiProgram.cs +++ b/RBLNews.Maui/MauiProgram.cs @@ -2,7 +2,10 @@ using CommunityToolkit.Maui.Markup; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; +using Microsoft.Maui.Controls.Hosting; +using Microsoft.Maui.Hosting; using RBLNews.Maui.Services; using RBLNews.Shared.Models; @@ -18,8 +21,8 @@ namespace RBLNews.Maui var builder = MauiApp.CreateBuilder(); builder .UseMauiApp() - .UseMauiCommunityToolkit() - .UseMauiCommunityToolkitMarkup() + .UseMauiCommunityToolkit() + .UseMauiCommunityToolkitMarkup() .ConfigureFonts(fonts => { //fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); @@ -33,19 +36,19 @@ namespace RBLNews.Maui builder.Services.AddSingleton(); #if DEBUG - builder.Services.AddBlazorWebViewDeveloperTools(); + builder.Services.AddBlazorWebViewDeveloperTools(); builder.Logging.AddDebug(); #endif - + MauiApp app = builder.Build(); - AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get(); + AppSettingsModel? appSettings = app.Configuration.GetSection("Logging").Get(); if (string.IsNullOrEmpty(appSettings?.BackendApiUrl)) { - throw new Exception($"can't instantiate services, due to paramters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); + throw new Exception($"can't instantiate services, due to parameters are null. backendApiUrl: '{appSettings?.BackendApiUrl}'"); } - + return app; } } diff --git a/RBLNews.Maui/RBLNews.Maui.csproj b/RBLNews.Maui/RBLNews.Maui.csproj index 9e9fc0d..6f9f35c 100644 --- a/RBLNews.Maui/RBLNews.Maui.csproj +++ b/RBLNews.Maui/RBLNews.Maui.csproj @@ -68,17 +68,39 @@ + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + - - - + + + @@ -87,22 +109,7 @@ - - - - - - wwwroot\appsettings.Development.json - - - wwwroot\appsettings.json - - - wwwroot\appsettings.Production.json - - - wwwroot\appsettings.Test.json - + diff --git a/RBLNews.Maui/appsettings.Development.json b/RBLNews.Maui/appsettings.Development.json new file mode 100644 index 0000000..7a608cd --- /dev/null +++ b/RBLNews.Maui/appsettings.Development.json @@ -0,0 +1,11 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "App": { + "BackendApiUrl": "https://localhost:5147" + } +} diff --git a/RBLNews.Maui/appsettings.Production.json b/RBLNews.Maui/appsettings.Production.json new file mode 100644 index 0000000..0c2c7dc --- /dev/null +++ b/RBLNews.Maui/appsettings.Production.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rblnews.de" + } +} diff --git a/RBLNews.Maui/appsettings.Test.json b/RBLNews.Maui/appsettings.Test.json new file mode 100644 index 0000000..8ceaf0e --- /dev/null +++ b/RBLNews.Maui/appsettings.Test.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rbl.wohlleben.dev" + } +} diff --git a/RBLNews.Maui/appsettings.json b/RBLNews.Maui/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/RBLNews.Maui/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/RBLNews.Shared/Component1.razor b/RBLNews.Shared/Component1.razor deleted file mode 100644 index eb0ab3d..0000000 --- a/RBLNews.Shared/Component1.razor +++ /dev/null @@ -1,3 +0,0 @@ -
- This component is defined in the RBLNews.Shared library. -
diff --git a/RBLNews.Shared/Component1.razor.css b/RBLNews.Shared/Component1.razor.css deleted file mode 100644 index c6afca4..0000000 --- a/RBLNews.Shared/Component1.razor.css +++ /dev/null @@ -1,6 +0,0 @@ -.my-component { - border: 2px dashed red; - padding: 1em; - margin: 1em 0; - background-image: url('background.png'); -} diff --git a/RBLNews.Shared/RBLNews.Shared.csproj b/RBLNews.Shared/RBLNews.Shared.csproj index ea85a54..15359dd 100644 --- a/RBLNews.Shared/RBLNews.Shared.csproj +++ b/RBLNews.Shared/RBLNews.Shared.csproj @@ -6,6 +6,22 @@ enable + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + @@ -21,18 +37,19 @@ - + + + + + PreserveNewest - - + + + + + PreserveNewest - - - PreserveNewest - - - PreserveNewest - + diff --git a/RBLNews.Shared/RBLNews.Shared.csproj.orig b/RBLNews.Shared/RBLNews.Shared.csproj.orig deleted file mode 100644 index 751c394..0000000 --- a/RBLNews.Shared/RBLNews.Shared.csproj.orig +++ /dev/null @@ -1,26 +0,0 @@ - - - - net8.0 - enable - enable - - - - - - - - -<<<<<<< HEAD -======= - - - ->>>>>>> css_bootstrap_blazor - - - - - - diff --git a/RBLNews.Shared/Services/FeedDataService.cs b/RBLNews.Shared/Services/FeedDataService.cs index baa645b..e38cdf8 100644 --- a/RBLNews.Shared/Services/FeedDataService.cs +++ b/RBLNews.Shared/Services/FeedDataService.cs @@ -29,7 +29,7 @@ namespace RBLNews.Shared.Services { this._configService = configService; } - + public async Task LoadFeeds() { Feeds = await httpClient.GetFromJsonAsync($"{this._configService.AppSettings.BackendApiUrl}/api/feeds") ?? new RssVM(); diff --git a/RBLNews.Shared/_Imports.razor.BASE b/RBLNews.Shared/_Imports.razor.BASE deleted file mode 100644 index 954960d..0000000 --- a/RBLNews.Shared/_Imports.razor.BASE +++ /dev/null @@ -1,4 +0,0 @@ -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using AntDesign - -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.LOCAL b/RBLNews.Shared/_Imports.razor.LOCAL deleted file mode 100644 index 7728512..0000000 --- a/RBLNews.Shared/_Imports.razor.LOCAL +++ /dev/null @@ -1 +0,0 @@ -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.REMOTE b/RBLNews.Shared/_Imports.razor.REMOTE deleted file mode 100644 index f1f2ce8..0000000 --- a/RBLNews.Shared/_Imports.razor.REMOTE +++ /dev/null @@ -1,4 +0,0 @@ -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using BlazorBootstrap; - -@using Microsoft.AspNetCore.Components.Web diff --git a/RBLNews.Shared/_Imports.razor.orig b/RBLNews.Shared/_Imports.razor.orig deleted file mode 100644 index dc53ee4..0000000 --- a/RBLNews.Shared/_Imports.razor.orig +++ /dev/null @@ -1,8 +0,0 @@ -<<<<<<< HEAD -@using Microsoft.AspNetCore.Components.Web -======= -@* ANT CSS DESIGN IMPORT -------------------- *@ -@using BlazorBootstrap; - -@using Microsoft.AspNetCore.Components.Web ->>>>>>> css_bootstrap_blazor diff --git a/RBLNews.Web/RBLNews.Web.csproj b/RBLNews.Web/RBLNews.Web.csproj index baee8a5..c36bac3 100644 --- a/RBLNews.Web/RBLNews.Web.csproj +++ b/RBLNews.Web/RBLNews.Web.csproj @@ -33,4 +33,8 @@ + + + + -- 2.43.0 From f185b549024c3c58f7829c6bb0d346f8ad6ae8b9 Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Thu, 26 Sep 2024 10:21:01 +0200 Subject: [PATCH 27/29] umbau auf enviroment appsettings --- RBLNews.Maui/MauiProgram.cs | 12 ++++++-- RBLNews.Maui/Properties/launchSettings.json | 5 ++- RBLNews.Maui/RBLNews.Maui.csproj | 12 ++++---- RBLNews.Web/RBLNews.Web.csproj | 34 +++++++++++++-------- RBLNews.Web/appsettings.Development.json | 11 +++++++ RBLNews.Web/appsettings.Production.json | 12 ++++++++ RBLNews.Web/appsettings.Test.json | 12 ++++++++ RBLNews.Web/appsettings.json | 9 ++++++ 8 files changed, 86 insertions(+), 21 deletions(-) create mode 100644 RBLNews.Web/appsettings.Development.json create mode 100644 RBLNews.Web/appsettings.Production.json create mode 100644 RBLNews.Web/appsettings.Test.json create mode 100644 RBLNews.Web/appsettings.json diff --git a/RBLNews.Maui/MauiProgram.cs b/RBLNews.Maui/MauiProgram.cs index dda7c91..f3b70e9 100644 --- a/RBLNews.Maui/MauiProgram.cs +++ b/RBLNews.Maui/MauiProgram.cs @@ -1,4 +1,5 @@ -using CommunityToolkit.Maui; +using System.Reflection; +using CommunityToolkit.Maui; using CommunityToolkit.Maui.Markup; using Microsoft.Extensions.Configuration; @@ -40,9 +41,16 @@ namespace RBLNews.Maui builder.Logging.AddDebug(); #endif + Stream? appSettingFile = Assembly.GetExecutingAssembly().GetManifestResourceStream($"appsettings.json"); + if (appSettingFile != null) + { + IConfiguration configuration = new ConfigurationManager().AddJsonStream(appSettingFile).Build(); + builder.Configuration.AddConfiguration(configuration); + } + MauiApp app = builder.Build(); - AppSettingsModel? appSettings = app.Configuration.GetSection("Logging").Get(); + AppSettingsModel? appSettings = app.Configuration.GetSection("App").Get(); if (string.IsNullOrEmpty(appSettings?.BackendApiUrl)) { diff --git a/RBLNews.Maui/Properties/launchSettings.json b/RBLNews.Maui/Properties/launchSettings.json index edf8aad..84a49a4 100644 --- a/RBLNews.Maui/Properties/launchSettings.json +++ b/RBLNews.Maui/Properties/launchSettings.json @@ -2,7 +2,10 @@ "profiles": { "Windows Machine": { "commandName": "MsixPackage", - "nativeDebugging": false + "nativeDebugging": false, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } } } } \ No newline at end of file diff --git a/RBLNews.Maui/RBLNews.Maui.csproj b/RBLNews.Maui/RBLNews.Maui.csproj index 6f9f35c..bb9493c 100644 --- a/RBLNews.Maui/RBLNews.Maui.csproj +++ b/RBLNews.Maui/RBLNews.Maui.csproj @@ -80,16 +80,14 @@ - + PreserveNewest - + PreserveNewest - - PreserveNewest - - + + PreserveNewest @@ -98,6 +96,8 @@ + + diff --git a/RBLNews.Web/RBLNews.Web.csproj b/RBLNews.Web/RBLNews.Web.csproj index c36bac3..3963f4a 100644 --- a/RBLNews.Web/RBLNews.Web.csproj +++ b/RBLNews.Web/RBLNews.Web.csproj @@ -7,6 +7,28 @@ Linux + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + @@ -19,18 +41,6 @@ Always - - appsettings.Development.json - - - appsettings.json - - - appsettings.Production.json - - - appsettings.Test.json - diff --git a/RBLNews.Web/appsettings.Development.json b/RBLNews.Web/appsettings.Development.json new file mode 100644 index 0000000..7a608cd --- /dev/null +++ b/RBLNews.Web/appsettings.Development.json @@ -0,0 +1,11 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "App": { + "BackendApiUrl": "https://localhost:5147" + } +} diff --git a/RBLNews.Web/appsettings.Production.json b/RBLNews.Web/appsettings.Production.json new file mode 100644 index 0000000..0c2c7dc --- /dev/null +++ b/RBLNews.Web/appsettings.Production.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rblnews.de" + } +} diff --git a/RBLNews.Web/appsettings.Test.json b/RBLNews.Web/appsettings.Test.json new file mode 100644 index 0000000..8ceaf0e --- /dev/null +++ b/RBLNews.Web/appsettings.Test.json @@ -0,0 +1,12 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*", + "App": { + "BackendApiUrl": "https://rbl.wohlleben.dev" + } +} diff --git a/RBLNews.Web/appsettings.json b/RBLNews.Web/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/RBLNews.Web/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} -- 2.43.0 From f322fb417304e6bc74d5e2b3eafab8d6ff3317d5 Mon Sep 17 00:00:00 2001 From: iTob Date: Thu, 26 Sep 2024 12:33:43 +0200 Subject: [PATCH 28/29] removed building angular app from ci-cd --- RBLNews.Shared/Services/FeedDataService.cs | 2 +- RBLNews.Web/appsettings.Development.json | 2 +- RBLNews.Web/appsettings.Production.json | 4 ++-- RBLNews.Web/appsettings.Test.json | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/RBLNews.Shared/Services/FeedDataService.cs b/RBLNews.Shared/Services/FeedDataService.cs index e38cdf8..a7746e4 100644 --- a/RBLNews.Shared/Services/FeedDataService.cs +++ b/RBLNews.Shared/Services/FeedDataService.cs @@ -32,7 +32,7 @@ namespace RBLNews.Shared.Services public async Task LoadFeeds() { - Feeds = await httpClient.GetFromJsonAsync($"{this._configService.AppSettings.BackendApiUrl}/api/feeds") ?? new RssVM(); + Feeds = await httpClient.GetFromJsonAsync($"{this._configService.AppSettings.BackendApiUrl}/feeds") ?? new RssVM(); DataChanged.Invoke(); } } diff --git a/RBLNews.Web/appsettings.Development.json b/RBLNews.Web/appsettings.Development.json index 7a608cd..54323f7 100644 --- a/RBLNews.Web/appsettings.Development.json +++ b/RBLNews.Web/appsettings.Development.json @@ -6,6 +6,6 @@ } }, "App": { - "BackendApiUrl": "https://localhost:5147" + "BackendApiUrl": "https://localhost:7127" } } diff --git a/RBLNews.Web/appsettings.Production.json b/RBLNews.Web/appsettings.Production.json index 0c2c7dc..484d0cf 100644 --- a/RBLNews.Web/appsettings.Production.json +++ b/RBLNews.Web/appsettings.Production.json @@ -5,8 +5,8 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", + "AllowedHosts": "*", "App": { - "BackendApiUrl": "https://rblnews.de" + "BackendApiUrl": "https://rblnews.de/api" } } diff --git a/RBLNews.Web/appsettings.Test.json b/RBLNews.Web/appsettings.Test.json index 8ceaf0e..9d1adf2 100644 --- a/RBLNews.Web/appsettings.Test.json +++ b/RBLNews.Web/appsettings.Test.json @@ -5,8 +5,8 @@ "Microsoft.AspNetCore": "Warning" } }, - "AllowedHosts": "*", + "AllowedHosts": "*", "App": { - "BackendApiUrl": "https://rbl.wohlleben.dev" + "BackendApiUrl": "https://rbl.wohlleben.dev/api" } } -- 2.43.0 From 5360cb1f49f844116db822249a825f1769461f6c Mon Sep 17 00:00:00 2001 From: iTob Date: Sat, 4 Oct 2025 16:26:11 +0200 Subject: [PATCH 29/29] removed Mac Catalyst target framework from project configuration --- RBLNews.Maui/RBLNews.Maui.csproj | 2 -- 1 file changed, 2 deletions(-) diff --git a/RBLNews.Maui/RBLNews.Maui.csproj b/RBLNews.Maui/RBLNews.Maui.csproj index bb9493c..eb6db69 100644 --- a/RBLNews.Maui/RBLNews.Maui.csproj +++ b/RBLNews.Maui/RBLNews.Maui.csproj @@ -1,7 +1,6 @@  - net8.0-maccatalyst;net8.0-android34.0 @@ -31,7 +30,6 @@ 1 14.2 - 14.0 31.0 10.0.17763.0 10.0.17763.0 -- 2.43.0