fix deploy config
This commit is contained in:
@@ -7,9 +7,11 @@ COPY ClientApp/ .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Build the backend
|
||||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS backend-build
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS backend-build
|
||||
WORKDIR /src
|
||||
COPY ["backend.csproj", "."]
|
||||
COPY nuget.config ./
|
||||
COPY backend.csproj ./
|
||||
RUN dotnet nuget list source
|
||||
RUN dotnet restore
|
||||
COPY . .
|
||||
# Copy the frontend build output from the previous stage
|
||||
@@ -17,7 +19,7 @@ COPY --from=frontend-build /app/dist ./ClientApp/dist
|
||||
RUN dotnet publish -c Release -o /app/publish
|
||||
|
||||
# Stage 3: Runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
ENV ASPNETCORE_URLS=http://+:8080
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<SpaRoot>ClientApp\</SpaRoot>
|
||||
|
||||
8
backend/nuget.config
Normal file
8
backend/nuget.config
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="iki" value="https://nuget.devneeds.ir/repository/nuget/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
||||
Reference in New Issue
Block a user