This commit is contained in:
xiaolipro 2025-01-05 20:10:44 +08:00
parent b90c194f91
commit bf92c013f5
4 changed files with 18 additions and 6 deletions

View File

@ -14,6 +14,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "solution items", "solution
common.props = common.props common.props = common.props
.gitignore = .gitignore .gitignore = .gitignore
global.json = global.json global.json = global.json
docker-compose.yml = docker-compose.yml
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InterfaceForward.Repositories", "src\InterfaceForward.Repositories\InterfaceForward.Repositories.csproj", "{AB53F0CC-DE7A-4AE9-B6AA-2A8283B4EB23}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InterfaceForward.Repositories", "src\InterfaceForward.Repositories\InterfaceForward.Repositories.csproj", "{AB53F0CC-DE7A-4AE9-B6AA-2A8283B4EB23}"

6
docker-compose.yml Normal file
View File

@ -0,0 +1,6 @@
services:
interfaceforward.api:
image: interfaceforward.api
build:
context: .
dockerfile: src/InterfaceForward.Api/Dockerfile

View File

@ -8,6 +8,11 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
ARG BUILD_CONFIGURATION=Release ARG BUILD_CONFIGURATION=Release
WORKDIR /src WORKDIR /src
COPY ["src/InterfaceForward.Api/InterfaceForward.Api.csproj", "src/InterfaceForward.Api/"] COPY ["src/InterfaceForward.Api/InterfaceForward.Api.csproj", "src/InterfaceForward.Api/"]
COPY ["src/InterfaceForward.Application/InterfaceForward.Application.csproj", "src/InterfaceForward.Application/"]
COPY ["src/InterfaceForward.Application.Contracts/InterfaceForward.Application.Contracts.csproj", "src/InterfaceForward.Application.Contracts/"]
COPY ["src/InterfaceForward.Domain.Shared/InterfaceForward.Domain.Shared.csproj", "src/InterfaceForward.Domain.Shared/"]
COPY ["src/InterfaceForward.Repositories/InterfaceForward.Repositories.csproj", "src/InterfaceForward.Repositories/"]
COPY ["src/InterfaceForward.ServiceDefaults/InterfaceForward.ServiceDefaults.csproj", "src/InterfaceForward.ServiceDefaults/"]
RUN dotnet restore "src/InterfaceForward.Api/InterfaceForward.Api.csproj" RUN dotnet restore "src/InterfaceForward.Api/InterfaceForward.Api.csproj"
COPY . . COPY . .
WORKDIR "/src/src/InterfaceForward.Api" WORKDIR "/src/src/InterfaceForward.Api"

View File

@ -7,12 +7,6 @@
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS> <DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\InterfaceForward.Application\InterfaceForward.Application.csproj" /> <ProjectReference Include="..\InterfaceForward.Application\InterfaceForward.Application.csproj" />
<ProjectReference Include="..\InterfaceForward.ServiceDefaults\InterfaceForward.ServiceDefaults.csproj"/> <ProjectReference Include="..\InterfaceForward.ServiceDefaults\InterfaceForward.ServiceDefaults.csproj"/>
@ -24,4 +18,10 @@
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" /> <PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="..\..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
</ItemGroup>
</Project> </Project>