diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0ff610c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base + +WORKDIR /docker +EXPOSE 5000 + +FROM mcr.microsoft.co/dotnet/sdk:6.0 AS build +WORKDIR /build +COPY . . +RUN dotnet restore src/UserPointManagement.Web/UserPointManagement.Web.csproj --configfile ./NuGet.Config +WORKDIR src/UserPointManagement.Web +RUN dotnet build UserPointManagement.Web.csproj -c Release + +FROM build AS publish +RUN dotnet publish UserPointManagement.Web.csproj -c Release -o /app + +FROM base AS final +WORKDIR /app +COPY --from=publish /app . + +ENV ASPNETCORE_URLS http://*:5000 +ENV TZ Asia/Shanghai + +ENTRYPOINT ["dotnet", "UserPointManagement.Web.dll"] + + diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..19d85b7 --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,6 @@ + + + + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..793a0ac --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## 会员积分管理系统 \ No newline at end of file diff --git a/UserPointManagement.sln b/UserPointManagement.sln index 217ae76..e4409cd 100644 --- a/UserPointManagement.sln +++ b/UserPointManagement.sln @@ -18,6 +18,13 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserPointManagement.Persist EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UserPointManagement.Application.Tests", "test\UserPointManagement.Application.Tests\UserPointManagement.Application.Tests.csproj", "{5770D3E5-9B3E-40FC-8209-62F0B4B45BD4}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{08F901D9-600A-4B4D-A942-AD2F61EDFE49}" + ProjectSection(SolutionItems) = preProject + Dockerfile = Dockerfile + README.md = README.md + NuGet.Config = NuGet.Config + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU