fix(infra): fix Dockerfile restore and build script solution name

Copy the layered project files before restore so the Docker build resolves project references, and build the correct solution file (TarninaHub.slnx) in scripts/build.mjs.
This commit is contained in:
Rafał Tyński
2026-10-04 01:50:01 +02:00
parent 1cbf965657
commit a9815b54e0
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -12,6 +12,9 @@ RUN npm run build
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src WORKDIR /src
COPY backend/TarninaHub.csproj ./backend/ COPY backend/TarninaHub.csproj ./backend/
COPY backend/Domain/TarninaHub.Domain.csproj ./backend/Domain/
COPY backend/Application/TarninaHub.Application.csproj ./backend/Application/
COPY backend/Infrastructure/TarninaHub.Infrastructure.csproj ./backend/Infrastructure/
RUN dotnet restore ./backend/TarninaHub.csproj RUN dotnet restore ./backend/TarninaHub.csproj
COPY backend/ ./backend/ COPY backend/ ./backend/
COPY --from=client /src/client/dist ./backend/wwwroot/ COPY --from=client /src/client/dist ./backend/wwwroot/
+1 -1
View File
@@ -15,6 +15,6 @@ function run(command) {
run('npm --prefix client run build') run('npm --prefix client run build')
run('node scripts/copy-client.mjs') run('node scripts/copy-client.mjs')
run('dotnet build HubMi.slnx --configuration Release') run('dotnet build TarninaHub.slnx --configuration Release')
console.log('\n[build] Done.') console.log('\n[build] Done.')