fix dockerfile
This commit is contained in:
@@ -3,6 +3,7 @@ using Dlhis.Basic.BusinessPlace.Response;
|
||||
using Dlhis.Basic.BusinessPlace.Services;
|
||||
using Dlhis.Basic.BusinessShift.Response;
|
||||
using Dlhis.Basic.BusinessShift.Services;
|
||||
using Dlhis.Common.Api;
|
||||
using Kurisu.Core.DataAccess.Dto;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
@@ -19,12 +20,14 @@ public class BusinessPlacesController : ControllerBase
|
||||
{
|
||||
private readonly IBusinessPlaceService _businessPlaceService;
|
||||
private readonly IBusinessPlaceShiftService _businessPlaceShiftService;
|
||||
private readonly IEnumSettingApi _enumSettingApi;
|
||||
|
||||
public BusinessPlacesController(IBusinessPlaceService businessPlaceService,
|
||||
IBusinessPlaceShiftService businessPlaceShiftService)
|
||||
IBusinessPlaceShiftService businessPlaceShiftService, IEnumSettingApi enumSettingApi)
|
||||
{
|
||||
_businessPlaceService = businessPlaceService;
|
||||
_businessPlaceShiftService = businessPlaceShiftService;
|
||||
_enumSettingApi = enumSettingApi;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,6 +38,7 @@ public class BusinessPlacesController : ControllerBase
|
||||
[HttpGet("page")]
|
||||
public async Task<Pagination<BusinessPlaceResponse>> GetPageAsync([FromQuery] BusinessPlacePageRequest request)
|
||||
{
|
||||
var enums = await _enumSettingApi.GetEnums();
|
||||
return await _businessPlaceService.GetPageAsync(request);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<GenerateDocumentationFile>True</GenerateDocumentationFile>
|
||||
<DockerfileContext>..\..</DockerfileContext>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -17,9 +18,11 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Kurisu.AspNetCore" Version="0.4.3" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Dlhis.Common.Api\Dlhis.Common.Api.csproj" />
|
||||
<ProjectReference Include="..\Dlhis.Entity\Dlhis.Entity.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@ EXPOSE 80
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Dlhis.Basic/Dlhis.Basic.csproj", "Dlhis.Basic/"]
|
||||
COPY ["Src/Dlhis.Basic/Dlhis.Basic.csproj", "Src/Dlhis.Basic/"]
|
||||
COPY ["Src/Dlhis.Entity/Dlhis.Entity.csproj", "Src/Dlhis.Entity/"]
|
||||
RUN dotnet restore "Dlhis.Basic/Dlhis.Basic.csproj"
|
||||
RUN dotnet restore "Src/Dlhis.Basic/Dlhis.Basic.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Dlhis.Basic"
|
||||
WORKDIR "/src/Src/Dlhis.Basic"
|
||||
RUN dotnet build "Dlhis.Basic.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"profiles": {
|
||||
"Dlhis.Basic": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": false,
|
||||
"launchUrl": "swagger/index.html",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
|
||||
@@ -4,5 +4,8 @@
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"InternalRequest": {
|
||||
"CommonRequestUrl": "http://localhost:5001"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,14 +7,6 @@
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://localhost:5001"
|
||||
},
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_URLS": "http://+:80"
|
||||
},
|
||||
"publishAllPorts": true
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json"
|
||||
|
||||
@@ -7,6 +7,7 @@ EXPOSE 80
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Src/Dlhis.Permission/Dlhis.Permission.csproj", "Src/Dlhis.Permission/"]
|
||||
COPY ["Src/Dlhis.Entity/Dlhis.Entity.csproj", "Src/Dlhis.Entity/"]
|
||||
RUN dotnet restore "Src/Dlhis.Permission/Dlhis.Permission.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Src/Dlhis.Permission"
|
||||
|
||||
Reference in New Issue
Block a user