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