From 5622040173d4eb27a5ff76ddb696833f5538b700 Mon Sep 17 00:00:00 2001 From: amirrezapanahi Date: Fri, 30 May 2025 15:34:55 +0100 Subject: [PATCH 1/2] changes --- docs/recipes/build/docker-image.md | 12 ++++++++++-- docs/recipes/upgrading/v4-to-v5.md | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/recipes/build/docker-image.md b/docs/recipes/build/docker-image.md index 537e02f6d..ff8204c5b 100644 --- a/docs/recipes/build/docker-image.md +++ b/docs/recipes/build/docker-image.md @@ -26,6 +26,7 @@ Now, add the following lines to the `.dockerignore` file: Create a `Dockerfile` with the following contents: ```dockerfile + FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build # Install node @@ -39,6 +40,13 @@ RUN apt-get update && apt-get install nodejs -y WORKDIR /workspace COPY . . + +# Install npm dependencies +WORKDIR /workspace/src/Client +RUN npm ci + +# Restore tools and build +WORKDIR /workspace RUN dotnet tool restore RUN dotnet run Bundle @@ -118,8 +126,8 @@ COPY src/Server src/Server RUN cd src/Server && dotnet publish -c release -o ../../deploy FROM build as client-build -COPY package.json package-lock.json ./ -RUN npm install +COPY src/Client/package.json src/Client/package-lock.json src/Client/ +RUN cd src/Client && npm install COPY src/Shared src/Shared COPY src/Client src/Client # tailwind.config.js needs to be in the dir where the diff --git a/docs/recipes/upgrading/v4-to-v5.md b/docs/recipes/upgrading/v4-to-v5.md index a73cad3f9..515c72d85 100644 --- a/docs/recipes/upgrading/v4-to-v5.md +++ b/docs/recipes/upgrading/v4-to-v5.md @@ -33,6 +33,7 @@ 1. `dotnet paket add --keep-minor`. This will download the latest version of the package you required *but will not update any associated dependencies outside of their existing major version*. ### Javascript tools and dependencies +1. **Move package.json & package-lock.json to `src/Client`** 1. **Update all dependencies.** 1. Replace `package.json` with [this file](https://raw.githubusercontent.com/SAFE-Stack/SAFE-template/master/Content/default/package.json). 1. Replace `package-lock.json` with [this file](https://raw.githubusercontent.com/SAFE-Stack/SAFE-template/master/Content/default/package-lock.json). From e233136e4509673bec830a99e514751159430602 Mon Sep 17 00:00:00 2001 From: amirrezapanahi Date: Fri, 30 May 2025 15:36:34 +0100 Subject: [PATCH 2/2] hotfix --- docs/recipes/build/docker-image.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/recipes/build/docker-image.md b/docs/recipes/build/docker-image.md index ff8204c5b..1280f1a75 100644 --- a/docs/recipes/build/docker-image.md +++ b/docs/recipes/build/docker-image.md @@ -26,7 +26,6 @@ Now, add the following lines to the `.dockerignore` file: Create a `Dockerfile` with the following contents: ```dockerfile - FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build # Install node