mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
feat(directory): ✨ init docker-compose
This commit is contained in:
parent
5968bfa22e
commit
2c66193416
6 changed files with 51 additions and 4 deletions
|
|
@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Directory.Infra
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilterLists.Directory.Infrastructure.Migrations", "directory\src\FilterLists.Directory.Infrastructure.Migrations\FilterLists.Directory.Infrastructure.Migrations.csproj", "{4F7D51FE-A1F3-4473-A8C3-D57EBDD8E60E}"
|
||||
EndProject
|
||||
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{8F04C802-830B-4B6D-8D53-5D2A87B4223D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -41,6 +43,10 @@ Global
|
|||
{4F7D51FE-A1F3-4473-A8C3-D57EBDD8E60E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4F7D51FE-A1F3-4473-A8C3-D57EBDD8E60E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4F7D51FE-A1F3-4473-A8C3-D57EBDD8E60E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8F04C802-830B-4B6D-8D53-5D2A87B4223D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8F04C802-830B-4B6D-8D53-5D2A87B4223D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8F04C802-830B-4B6D-8D53-5D2A87B4223D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8F04C802-830B-4B6D-8D53-5D2A87B4223D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@ EXPOSE 443
|
|||
|
||||
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
|
||||
WORKDIR /src
|
||||
COPY ["FilterLists.Directory.Api/FilterLists.Directory.Api.csproj", "FilterLists.Directory.Api/"]
|
||||
RUN dotnet restore "FilterLists.Directory.Api/FilterLists.Directory.Api.csproj"
|
||||
COPY ["directory/src/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj", "directory/src/FilterLists.Directory.Api/"]
|
||||
RUN dotnet restore "directory/src/FilterLists.Directory.Api/FilterLists.Directory.Api.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/FilterLists.Directory.Api"
|
||||
WORKDIR "/src/directory/src/FilterLists.Directory.Api"
|
||||
RUN dotnet build "FilterLists.Directory.Api.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
|
|
@ -19,4 +19,4 @@ RUN dotnet publish "FilterLists.Directory.Api.csproj" -c Release -o /app/publish
|
|||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Directory.Api.dll"]
|
||||
ENTRYPOINT ["dotnet", "FilterLists.Directory.Api.dll"]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UserSecretsId>9bfe2a36-880e-4da0-994f-a9641e228ba3</UserSecretsId>
|
||||
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
|
||||
<DockerComposeProjectPath>..\..\..\docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<DockerfileContext>..\..\..</DockerfileContext>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
18
docker-compose.dcproj
Normal file
18
docker-compose.dcproj
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectVersion>2.1</ProjectVersion>
|
||||
<DockerTargetOS>Linux</DockerTargetOS>
|
||||
<ProjectGuid>8f04c802-830b-4b6d-8d53-5d2a87b4223d</ProjectGuid>
|
||||
<DockerLaunchAction>LaunchBrowser</DockerLaunchAction>
|
||||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/weatherforecast</DockerServiceUrl>
|
||||
<DockerServiceName>filterlists.directory.api</DockerServiceName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="docker-compose.override.yml">
|
||||
<DependentUpon>docker-compose.yml</DependentUpon>
|
||||
</None>
|
||||
<None Include="docker-compose.yml" />
|
||||
<None Include=".dockerignore" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
13
docker-compose.override.yml
Normal file
13
docker-compose.override.yml
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
filterlists.directory.api:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=https://+:443;http://+:80
|
||||
ports:
|
||||
- "80"
|
||||
- "443"
|
||||
volumes:
|
||||
- ${APPDATA}/Microsoft/UserSecrets:/root/.microsoft/usersecrets:ro
|
||||
- ${APPDATA}/ASP.NET/Https:/root/.aspnet/https:ro
|
||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
version: '3.4'
|
||||
|
||||
services:
|
||||
filterlists.directory.api:
|
||||
image: ${DOCKER_REGISTRY-}filterlistsdirectoryapi
|
||||
build:
|
||||
context: .
|
||||
dockerfile: directory/src/FilterLists.Directory.Api/Dockerfile
|
||||
Loading…
Reference in a new issue