fix build

This commit is contained in:
2026-09-03 08:42:09 +03:30
parent e360fa6890
commit 355ba46592
2 changed files with 5 additions and 1 deletions

View File

@@ -1,5 +1,9 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src WORKDIR /src
# Install Node.js for frontend build
RUN apt-get update && apt-get install -y nodejs npm && rm -rf /var/lib/apt/lists/*
COPY ./src/ . COPY ./src/ .
RUN dotnet restore --verbosity detailed RUN dotnet restore --verbosity detailed
RUN dotnet publish -c Release -o /app RUN dotnet publish -c Release -o /app

View File

@@ -29,7 +29,7 @@
</ItemGroup> </ItemGroup>
<Target Name="BuildFrontend" BeforeTargets="Build" Condition="'$(Configuration)' == 'Release' And Exists('..\GreenHome.Web\package.json')"> <Target Name="BuildFrontend" BeforeTargets="Build" Condition="'$(Configuration)' == 'Release' And Exists('..\GreenHome.Web\package.json')">
<Exec Command="npm.cmd run build" WorkingDirectory="..\GreenHome.Web" /> <Exec Command="npm run build" WorkingDirectory="..\GreenHome.Web" />
<ItemGroup> <ItemGroup>
<FrontendDist Include="..\GreenHome.Web\dist\**\*" /> <FrontendDist Include="..\GreenHome.Web\dist\**\*" />
</ItemGroup> </ItemGroup>