fix build
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user