Skip to content

Commit

Permalink
add docker support and docker-compose orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Georgiev committed Feb 13, 2022
1 parent 2ea2cde commit aac3d50
Show file tree
Hide file tree
Showing 160 changed files with 4,063 additions and 44 deletions.
25 changes: 25 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
13 changes: 13 additions & 0 deletions .idea/.idea.ECommerce/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.ECommerce/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.ECommerce/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.ECommerce/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,087 changes: 1,087 additions & 0 deletions .idea/config/applicationhost.config

Large diffs are not rendered by default.

Binary file added .vs/ECommerce/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
31 changes: 31 additions & 0 deletions .vs/ECommerce/project-colors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"Version": 1,
"ProjectMap": {
"8accd38f-7a09-4696-aa74-4f4888132e99": {
"ProjectGuid": "8accd38f-7a09-4696-aa74-4f4888132e99",
"DisplayName": "docker-compose",
"ColorIndex": 0
},
"e86e5ace-d59e-422b-9195-3c7a14eb0939": {
"ProjectGuid": "e86e5ace-d59e-422b-9195-3c7a14eb0939",
"DisplayName": "ECommerce.Api.Search",
"ColorIndex": 1
},
"1a9ffa4e-a7ac-4a8c-88a7-852b07cca7b4": {
"ProjectGuid": "1a9ffa4e-a7ac-4a8c-88a7-852b07cca7b4",
"DisplayName": "docker-compose",
"ColorIndex": 2
},
"a2fe74e1-b743-11d0-ae1a-00a0c90fffc3": {
"ProjectGuid": "a2fe74e1-b743-11d0-ae1a-00a0c90fffc3",
"DisplayName": "Miscellaneous Files",
"ColorIndex": -1
},
"2e8bfe59-44ba-45eb-89b0-6fd5963a2f8d": {
"ProjectGuid": "2e8bfe59-44ba-45eb-89b0-6fd5963a2f8d",
"DisplayName": "docker-compose",
"ColorIndex": 3
}
},
"NextColorIndex": 4
}
Binary file added .vs/ECommerce/v17/.futdcache.v1
Binary file not shown.
Binary file added .vs/ECommerce/v17/.suo
Binary file not shown.
Binary file added .vs/ECommerse/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
11 changes: 11 additions & 0 deletions .vs/ECommerse/project-colors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Version": 1,
"ProjectMap": {
"b81e1306-62e5-4e73-a742-8f44fbdb8d5c": {
"ProjectGuid": "b81e1306-62e5-4e73-a742-8f44fbdb8d5c",
"DisplayName": "ECommerce.Api.Customers",
"ColorIndex": 0
}
},
"NextColorIndex": 1
}
Binary file added .vs/ECommerse/v17/.futdcache.v1
Binary file not shown.
Binary file added .vs/ECommerse/v17/.suo
Binary file not shown.
25 changes: 25 additions & 0 deletions ECommerce.Api.Customers/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
20 changes: 20 additions & 0 deletions ECommerce.Api.Customers/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["ECommerce.Api.Customers/ECommerce.Api.Customers.csproj", "ECommerce.Api.Customers/"]
RUN dotnet restore "ECommerce.Api.Customers/ECommerce.Api.Customers.csproj"
COPY . .
WORKDIR "/src/ECommerce.Api.Customers"
RUN dotnet build "ECommerce.Api.Customers.csproj" -c Release -o /app/build

FROM build AS publish
RUN dotnet publish "ECommerce.Api.Customers.csproj" -c Release -o /app/publish

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "ECommerce.Api.Customers.dll"]
4 changes: 4 additions & 0 deletions ECommerce.Api.Customers/ECommerce.Api.Customers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DockerDefaultTargetOS>Windows</DockerDefaultTargetOS>
<DockerComposeProjectPath>..\docker-compose.dcproj</DockerComposeProjectPath>
<UserSecretsId>edaead62-2914-4976-bca0-9b9e07ba8236</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AutoMapper.Extensions.Microsoft.DependencyInjection" Version="11.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="6.0.2" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.14.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
</ItemGroup>

Expand Down
17 changes: 12 additions & 5 deletions ECommerce.Api.Customers/Properties/launchSettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
Expand All @@ -11,13 +11,13 @@
"profiles": {
"ECommerce.Api.Customers": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7075;http://localhost:5075",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"applicationUrl": "https://localhost:7075;http://localhost:5075",
"dotnetRunMessages": true
},
"IIS Express": {
"commandName": "IISExpress",
Expand All @@ -26,6 +26,13 @@
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger",
"publishAllPorts": true,
"useSSL": true
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"AutoMapper.Extensions.Microsoft.DependencyInjection": "11.0.0",
"Microsoft.EntityFrameworkCore": "6.0.2",
"Microsoft.EntityFrameworkCore.InMemory": "6.0.2",
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": "1.14.0",
"Swashbuckle.AspNetCore": "6.2.3"
},
"runtime": {
Expand Down Expand Up @@ -135,6 +136,7 @@
}
}
},
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets/1.14.0": {},
"Swashbuckle.AspNetCore/6.2.3": {
"dependencies": {
"Microsoft.Extensions.ApiDescription.Server": "3.0.0",
Expand Down Expand Up @@ -311,6 +313,13 @@
"path": "microsoft.openapi/1.2.3",
"hashPath": "microsoft.openapi.1.2.3.nupkg.sha512"
},
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets/1.14.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-yORzATlNmCp4kEwkxznLZ3maTaUJc5yTcu3aPufY8Tq4141/bRRWsa91u8I24MR3BTCCJlZO98xuQWB4arlKCw==",
"path": "microsoft.visualstudio.azure.containers.tools.targets/1.14.0",
"hashPath": "microsoft.visualstudio.azure.containers.tools.targets.1.14.0.nupkg.sha512"
},
"Swashbuckle.AspNetCore/6.2.3": {
"type": "package",
"serviceable": true,
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand All @@ -11,6 +10,7 @@
using System;
using System.Reflection;

[assembly: Microsoft.Extensions.Configuration.UserSecrets.UserSecretsIdAttribute("edaead62-2914-4976-bca0-9b9e07ba8236")]
[assembly: System.Reflection.AssemblyCompanyAttribute("ECommerce.Api.Customers")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21490136e7136bb4aca92ee237a815610d5ab7e6
c2dd58a1b2f2ee7ce0890905c624881e34da7fff
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fc4f14c3d5ebcb5c65bc97a6b2ecc7914707eca0
de576faf5ef13175e23b96e200ac578a32d3ef30
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.csproj.AssemblyReference.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.GeneratedMSBuildEditorConfig.editorconfig
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.AssemblyInfoInputs.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.AssemblyInfo.cs
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.csproj.CoreCompileInputs.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.MvcApplicationPartsAssemblyInfo.cs
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.MvcApplicationPartsAssemblyInfo.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\appsettings.Development.json
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\appsettings.json
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\ECommerce.Api.Customers.exe
Expand All @@ -23,6 +16,13 @@ C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\Microsoft.Ope
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\Swashbuckle.AspNetCore.Swagger.dll
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerGen.dll
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\bin\Debug\net6.0\Swashbuckle.AspNetCore.SwaggerUI.dll
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.csproj.AssemblyReference.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.GeneratedMSBuildEditorConfig.editorconfig
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.AssemblyInfoInputs.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.AssemblyInfo.cs
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.csproj.CoreCompileInputs.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.MvcApplicationPartsAssemblyInfo.cs
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\ECommerce.Api.Customers.MvcApplicationPartsAssemblyInfo.cache
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\staticwebassets.build.json
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\staticwebassets.development.json
C:\work\play\cs\ECommerce\ECommerce.Api.Customers\obj\Debug\net6.0\scopedcss\bundle\ECommerce.Api.Customers.styles.css
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b3303c42af9a472b998064a2faa613b2326d0cf5
e1cb4f9f5a6246db90b795a7cdcffcaabd7af25d
Binary file not shown.
Binary file modified ECommerce.Api.Customers/obj/Debug/net6.0/apphost.exe
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Version": 1,
"Hash": "Uc4rRbJHKtDLkS+T3SKjQb/gBOJRrTDSGy6PIxcYpmo=",
"Hash": "7NOBgRr3O9Kb/p79tqZVC5oquCLSE1WNEV62/SjOjT8=",
"Source": "ECommerce.Api.Customers",
"BasePath": "_content/ECommerce.Api.Customers",
"Mode": "Default",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
"target": "Package",
"version": "[6.0.2, )"
},
"Microsoft.VisualStudio.Azure.Containers.Tools.Targets": {
"target": "Package",
"version": "[1.14.0, )"
},
"Swashbuckle.AspNetCore": {
"target": "Package",
"version": "[6.2.3, )"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.props')" />
<Import Project="$(NuGetPackageRoot)swashbuckle.aspnetcore\6.2.3\build\Swashbuckle.AspNetCore.props" Condition="Exists('$(NuGetPackageRoot)swashbuckle.aspnetcore\6.2.3\build\Swashbuckle.AspNetCore.props')" />
<Import Project="$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.14.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.props" Condition="Exists('$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.14.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.props')" />
</ImportGroup>
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<PkgMicrosoft_Extensions_ApiDescription_Server Condition=" '$(PkgMicrosoft_Extensions_ApiDescription_Server)' == '' ">C:\Users\AntonG\.nuget\packages\microsoft.extensions.apidescription.server\3.0.0</PkgMicrosoft_Extensions_ApiDescription_Server>
<PkgMicrosoft_VisualStudio_Azure_Containers_Tools_Targets Condition=" '$(PkgMicrosoft_VisualStudio_Azure_Containers_Tools_Targets)' == '' ">C:\Users\AntonG\.nuget\packages\microsoft.visualstudio.azure.containers.tools.targets\1.14.0</PkgMicrosoft_VisualStudio_Azure_Containers_Tools_Targets>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.extensions.apidescription.server\3.0.0\build\Microsoft.Extensions.ApiDescription.Server.targets')" />
<Import Project="$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.14.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets" Condition="Exists('$(NuGetPackageRoot)microsoft.visualstudio.azure.containers.tools.targets\1.14.0\build\Microsoft.VisualStudio.Azure.Containers.Tools.Targets.targets')" />
</ImportGroup>
</Project>
Loading

0 comments on commit aac3d50

Please sign in to comment.