Browse Source

Merge branch 'master' of http://10.2.1.24:10244/bpa/DataV

master
fyf 2 years ago
parent
commit
8bb00f30a0
3 changed files with 22 additions and 16 deletions
  1. +3
    -0
      DataVAPI/DataVAPI.csproj
  2. +12
    -14
      DataVAPI/Properties/launchSettings.json
  3. +7
    -2
      Dockerfile

+ 3
- 0
DataVAPI/DataVAPI.csproj View File

@@ -4,6 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<GenerateDocumentationFile>True</GenerateDocumentationFile>
<DocumentationFile></DocumentationFile>
<UserSecretsId>8ccc4837-3ca5-46df-8a17-d760168ea964</UserSecretsId>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>

<ItemGroup>
@@ -19,6 +21,7 @@
<PackageReference Include="Microsoft.Extensions.Configuration" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.3.0" />
</ItemGroup>



+ 12
- 14
DataVAPI/Properties/launchSettings.json View File

@@ -1,4 +1,4 @@
{
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
@@ -9,23 +9,21 @@
}
},
"profiles": {
//"IIS Express": {
// "commandName": "IISExpress",
// "launchBrowser": true,
// "launchUrl": "swagger",
// "environmentVariables": {
// "ASPNETCORE_ENVIRONMENT": "Development"
// }
//},
"服务API": {
"commandName": "Project",
"dotnetRunMessages": "true",
"launchBrowser": true,
//"launchUrl": "swagger",
"applicationUrl": "http://192.168.1.108:20000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"applicationUrl": "http://192.168.1.108:20000",
"dotnetRunMessages": "true"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"publishAllPorts": true,
"useSSL": true
}
}
}
}

+ 7
- 2
Dockerfile View File

@@ -3,14 +3,19 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["NuGet.config", "."]
COPY ["DataVAPI/DataVAPI.csproj", "DataVAPI/"]
RUN dotnet restore "DataVAPI/DataVAPI.csproj" --configfile "NuGet.config"
COPY ["DataVApi.Order/DataVApi.Order.csproj", "DataVApi.Order/"]
COPY ["DataVAPI.ServerDB/DataVAPI.ServerDB.csproj", "DataVAPI.ServerDB/"]
COPY ["DataVAPI.Tools/DataVAPI.Tool.csproj", "DataVAPI.Tools/"]
COPY ["DataVAPI.Model/DataVAPI.Model.csproj", "DataVAPI.Model/"]
RUN dotnet restore "DataVAPI/DataVAPI.csproj" --configfile "NuGet.config"
COPY . .
WORKDIR "/src/DataV"
WORKDIR "/src/DataVAPI"
RUN dotnet build "DataVAPI.csproj" -c Release -o /app/build

FROM build AS publish


Loading…
Cancel
Save