mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(archival): ✨ stub new archival proj
This commit is contained in:
parent
8cc3063df0
commit
257f8e3156
7 changed files with 139 additions and 1 deletions
|
|
@ -43,7 +43,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Data", "Data", "{8F419098-3
|
|||
directory\data\Tag.json = directory\data\Tag.json
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Directory.Infrastructure.Migrations.Tests", "directory\tests\FilterLists.Directory.Infrastructure.Migrations.Tests\FilterLists.Directory.Infrastructure.Migrations.Tests.csproj", "{8B07EF04-5516-40BB-B21B-CEC6F90EC631}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FilterLists.Directory.Infrastructure.Migrations.Tests", "directory\tests\FilterLists.Directory.Infrastructure.Migrations.Tests\FilterLists.Directory.Infrastructure.Migrations.Tests.csproj", "{8B07EF04-5516-40BB-B21B-CEC6F90EC631}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Archival", "Archival", "{5E52FEF9-9605-4ACB-8A42-A20E06331599}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Archival", "archival\src\FilterLists.Archival\FilterLists.Archival.csproj", "{20A2E5A2-B218-410A-90DA-090A6A3087DF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
|
|
@ -79,6 +83,10 @@ Global
|
|||
{8B07EF04-5516-40BB-B21B-CEC6F90EC631}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8B07EF04-5516-40BB-B21B-CEC6F90EC631}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8B07EF04-5516-40BB-B21B-CEC6F90EC631}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20A2E5A2-B218-410A-90DA-090A6A3087DF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20A2E5A2-B218-410A-90DA-090A6A3087DF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20A2E5A2-B218-410A-90DA-090A6A3087DF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20A2E5A2-B218-410A-90DA-090A6A3087DF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -91,6 +99,7 @@ Global
|
|||
{4F7D51FE-A1F3-4473-A8C3-D57EBDD8E60E} = {AE5D6471-1B6E-4B06-A313-34EF81F35342}
|
||||
{8F419098-3EEB-4B4B-99A8-70555FA93DAF} = {AE5D6471-1B6E-4B06-A313-34EF81F35342}
|
||||
{8B07EF04-5516-40BB-B21B-CEC6F90EC631} = {AE5D6471-1B6E-4B06-A313-34EF81F35342}
|
||||
{20A2E5A2-B218-410A-90DA-090A6A3087DF} = {5E52FEF9-9605-4ACB-8A42-A20E06331599}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {758B57EF-7505-4BE2-90A2-E2DE2EC32909}
|
||||
|
|
|
|||
20
services/archival/src/FilterLists.Archival/Dockerfile
Normal file
20
services/archival/src/FilterLists.Archival/Dockerfile
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# init base
|
||||
FROM mcr.microsoft.com/dotnet/core/runtime-deps:3.1-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
# init build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
|
||||
|
||||
# restore
|
||||
WORKDIR /src/FilterLists.Archival
|
||||
COPY archival/src/FilterLists.Archival/FilterLists.Archival.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
# build
|
||||
COPY archival/src/FilterLists.Archival/. .
|
||||
RUN dotnet publish -c Release --no-restore -o /app/publish -p:PublishReadyToRun=true -p:PublishSingleFile=true -p:PublishTrimmed=true -r linux-musl-x64
|
||||
|
||||
# package final
|
||||
FROM base AS final
|
||||
COPY --from=build /app/publish .
|
||||
ENTRYPOINT ./FilterLists.Archival
|
||||
20
services/archival/src/FilterLists.Archival/Dockerfile.dev
Normal file
20
services/archival/src/FilterLists.Archival/Dockerfile.dev
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# init base for Visual Studio debugging
|
||||
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS base
|
||||
WORKDIR /app
|
||||
|
||||
# init build
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-alpine AS build
|
||||
|
||||
# restore
|
||||
WORKDIR /src/FilterLists.Archival
|
||||
COPY archival/src/FilterLists.Archival/FilterLists.Archival.csproj .
|
||||
RUN dotnet restore
|
||||
|
||||
# build
|
||||
COPY archival/src/FilterLists.Archival/. .
|
||||
RUN dotnet publish --no-restore -o /app/publish -r linux-musl-x64
|
||||
|
||||
# package final
|
||||
FROM base AS final
|
||||
COPY --from=build /app/publish .
|
||||
ENTRYPOINT ./FilterLists.Archival
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
<PublishReadyToRunShowWarnings>true</PublishReadyToRunShowWarnings>
|
||||
<RuntimeIdentifiers>linux-musl-x64;win10-x64</RuntimeIdentifiers>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Authors>Collin M. Barrett</Authors>
|
||||
<Company>FilterLists</Company>
|
||||
<Product>FilterLists Archival</Product>
|
||||
<Description>The independent, comprehensive directory of filter and host lists for advertisements, trackers, malware, and annoyances.</Description>
|
||||
<Copyright>Copyright (c) 2020 Collin M. Barrett</Copyright>
|
||||
<RepositoryUrl>https://github.com/collinbarrett/FilterLists</RepositoryUrl>
|
||||
<PackageProjectUrl>https://filterlists.com</PackageProjectUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<NoWarn>1701;1702;CA2007</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
<NoWarn>CA2007</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
21
services/archival/src/FilterLists.Archival/Program.cs
Normal file
21
services/archival/src/FilterLists.Archival/Program.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace FilterLists.Archival
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static async Task Main(string[] args)
|
||||
{
|
||||
var host = CreateHostBuilder(args).Build();
|
||||
await host.RunAsync();
|
||||
}
|
||||
|
||||
public static IHostBuilder CreateHostBuilder(string[] args)
|
||||
{
|
||||
return Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder => webBuilder.UseStartup<Startup>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"Docker": {
|
||||
"commandName": "Docker",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
|
||||
"publishAllPorts": true
|
||||
}
|
||||
}
|
||||
}
|
||||
20
services/archival/src/FilterLists.Archival/Startup.cs
Normal file
20
services/archival/src/FilterLists.Archival/Startup.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
|
||||
namespace FilterLists.Archival
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public static void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
}
|
||||
|
||||
public static void Configure(IApplicationBuilder app, IWebHostEnvironment env)
|
||||
{
|
||||
if (env.IsDevelopment())
|
||||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue