mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
docker API updates
This commit is contained in:
parent
8180eb9f22
commit
2398bd76c9
2 changed files with 98 additions and 18 deletions
81
FilterLists.Api.sln
Normal file
81
FilterLists.Api.sln
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.28803.202
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Api", "src\FilterLists.Api\FilterLists.Api.csproj", "{57E4CE18-41F3-48F6-B142-12947FFBA86C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Data", "src\FilterLists.Data\FilterLists.Data.csproj", "{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Services", "src\FilterLists.Services\FilterLists.Services.csproj", "{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "data", "data", "{8C3C7C63-F5EF-4E4E-B9BF-47F6EA7D2CBD}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
data\Dependent.json = data\Dependent.json
|
||||
data\FilterList.json = data\FilterList.json
|
||||
data\FilterListLanguage.json = data\FilterListLanguage.json
|
||||
data\FilterListMaintainer.json = data\FilterListMaintainer.json
|
||||
data\FilterListTag.json = data\FilterListTag.json
|
||||
data\Fork.json = data\Fork.json
|
||||
data\Language.json = data\Language.json
|
||||
data\License.json = data\License.json
|
||||
data\Maintainer.json = data\Maintainer.json
|
||||
data\Merge.json = data\Merge.json
|
||||
data\README.md = data\README.md
|
||||
data\Software.json = data\Software.json
|
||||
data\SoftwareSyntax.json = data\SoftwareSyntax.json
|
||||
data\Syntax.json = data\Syntax.json
|
||||
data\Tag.json = data\Tag.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Services.Tests", "tests\FilterLists.Services.Tests\FilterLists.Services.Tests.csproj", "{7D9F0D85-E906-401A-BDAD-724440B34567}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Data.Tests", "tests\FilterLists.Data.Tests\FilterLists.Data.Tests.csproj", "{DA34DED7-B352-4855-9C7B-9E3D983DBE2E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CE4AB25B-5501-42E9-B8B4-87B9C20472AC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{041F9CFA-B6F7-4DEB-9441-829DE697B1BB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{57E4CE18-41F3-48F6-B142-12947FFBA86C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{57E4CE18-41F3-48F6-B142-12947FFBA86C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{57E4CE18-41F3-48F6-B142-12947FFBA86C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{57E4CE18-41F3-48F6-B142-12947FFBA86C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7D9F0D85-E906-401A-BDAD-724440B34567}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7D9F0D85-E906-401A-BDAD-724440B34567}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7D9F0D85-E906-401A-BDAD-724440B34567}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7D9F0D85-E906-401A-BDAD-724440B34567}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DA34DED7-B352-4855-9C7B-9E3D983DBE2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DA34DED7-B352-4855-9C7B-9E3D983DBE2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DA34DED7-B352-4855-9C7B-9E3D983DBE2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DA34DED7-B352-4855-9C7B-9E3D983DBE2E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{57E4CE18-41F3-48F6-B142-12947FFBA86C} = {CE4AB25B-5501-42E9-B8B4-87B9C20472AC}
|
||||
{944ADE8F-18E3-4DB8-9098-6A55E026EAC1} = {CE4AB25B-5501-42E9-B8B4-87B9C20472AC}
|
||||
{9F296ECF-97C9-47E6-A794-5AD900ECFE6C} = {CE4AB25B-5501-42E9-B8B4-87B9C20472AC}
|
||||
{7D9F0D85-E906-401A-BDAD-724440B34567} = {041F9CFA-B6F7-4DEB-9441-829DE697B1BB}
|
||||
{DA34DED7-B352-4855-9C7B-9E3D983DBE2E} = {041F9CFA-B6F7-4DEB-9441-829DE697B1BB}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {8A31B449-52DD-4445-A9C4-033A24E25308}
|
||||
EndGlobalSection
|
||||
GlobalSection(NDepend) = preSolution
|
||||
Project = ".\FilterLists.ndproj"
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -4,11 +4,15 @@
|
|||
FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine AS build
|
||||
|
||||
# restore
|
||||
COPY FilterLists.Api.sln ./
|
||||
WORKDIR /src/
|
||||
COPY src/FilterLists.Data/FilterLists.Data.csproj ./FilterLists.Data/
|
||||
COPY src/FilterLists.Services/FilterLists.Services.csproj ./FilterLists.Services/
|
||||
COPY src/FilterLists.Api/FilterLists.Api.csproj ./FilterLists.Api/
|
||||
WORKDIR /src/FilterLists.Api/
|
||||
WORKDIR /tests/
|
||||
COPY tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj ./FilterLists.Data.Tests/
|
||||
COPY tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj ./FilterLists.Services.Tests/
|
||||
WORKDIR /
|
||||
RUN dotnet restore
|
||||
|
||||
# publish
|
||||
|
|
@ -19,29 +23,24 @@ COPY src/FilterLists.Api/. ./FilterLists.Api/
|
|||
WORKDIR /src/FilterLists.Api/
|
||||
RUN dotnet publish -c Release -o out --no-restore
|
||||
|
||||
# restore data tests
|
||||
# FROM build AS test-data
|
||||
# COPY tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj ./tests/FilterLists.Data.Tests/
|
||||
# RUN dotnet restore tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj
|
||||
|
||||
# build data tests
|
||||
# COPY tests/FilterLists.Data.Tests/. ./tests/FilterLists.Data.Tests/
|
||||
# RUN dotnet build tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj -c Release --no-restore
|
||||
# ENTRYPOINT ["dotnet", "test", "./tests/FilterLists.Data.Tests/FilterLists.Data.Tests.csproj"]
|
||||
|
||||
# restore services tests
|
||||
# FROM build AS test-services
|
||||
# COPY tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj ./tests/FilterLists.Services.Tests/
|
||||
# RUN dotnet restore tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj
|
||||
FROM build AS test-data
|
||||
WORKDIR /tests/FilterLists.Data.Tests/
|
||||
COPY tests/FilterLists.Data.Tests/. ./
|
||||
RUN dotnet build -c Release --no-restore
|
||||
ENTRYPOINT ["dotnet", "test"]
|
||||
|
||||
# build services tests
|
||||
# COPY tests/FilterLists.Services.Tests/. ./tests/FilterLists.Services.Tests/
|
||||
# RUN dotnet build tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj -c Release --no-restore
|
||||
# ENTRYPOINT ["dotnet", "test", "./tests/FilterLists.Services.Tests/FilterLists.Services.Tests.csproj"]
|
||||
FROM build AS test-services
|
||||
WORKDIR /tests/FilterLists.Services.Tests/
|
||||
COPY tests/FilterLists.Services.Tests/. ./
|
||||
RUN dotnet build -c Release --no-restore
|
||||
ENTRYPOINT ["dotnet", "test"]
|
||||
|
||||
# run
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-alpine as runtime
|
||||
EXPOSE 5000
|
||||
ENV DataDirectory__Path "data"
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Api.dll"]
|
||||
EXPOSE 5000
|
||||
COPY --from=build /src/FilterLists.Api/out ./
|
||||
COPY data/. ./data/
|
||||
|
|
|
|||
Loading…
Reference in a new issue