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:
@@ -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
@@ -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.')
|
||||||
|
|||||||
Reference in New Issue
Block a user