From 4127d90b0129dd4bebd4f1dae8177af762d24921 Mon Sep 17 00:00:00 2001 From: Steve Smith Date: Wed, 11 Sep 2019 23:35:13 -0400 Subject: [PATCH] Adding docker-compose project (#302) --- docker-compose.dcproj | 18 ++++++++++++++++++ docker-compose.override.yml | 14 ++++++++++++++ docker-compose.yml | 21 +++++++++------------ eShopOnWeb.sln | 6 ++++++ src/Web/Properties/launchSettings.json | 8 ++++---- 5 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 docker-compose.dcproj create mode 100644 docker-compose.override.yml mode change 100644 => 100755 eShopOnWeb.sln diff --git a/docker-compose.dcproj b/docker-compose.dcproj new file mode 100644 index 0000000..9fe6e6f --- /dev/null +++ b/docker-compose.dcproj @@ -0,0 +1,18 @@ + + + + 2.1 + Linux + {1FCBE191-34FE-4B2E-8915-CA81553958AD} + True + {Scheme}://localhost:{ServicePort} + eshopwebmvc + + + + docker-compose.yml + + + + + diff --git a/docker-compose.override.yml b/docker-compose.override.yml new file mode 100644 index 0000000..40b962b --- /dev/null +++ b/docker-compose.override.yml @@ -0,0 +1,14 @@ +version: '3.4' + +services: + eshopwebmvc: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=https://+:443;http://+:80 + - ASPNETCORE_HTTPS_PORT=5443 + ports: + - "5106:80" + - "5443:443" + volumes: + - ~/.aspnet/https:/root/.aspnet/https:ro + - ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 27cec08..4a4d113 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,12 +1,9 @@ -version: '3' - -services: - eshopwebmvc: - image: eshopwebmvc - build: - context: . - dockerfile: src/Web/Dockerfile - environment: - - ASPNETCORE_ENVIRONMENT=Development - ports: - - "5106:80" # the aspnetcore container sets 80 as the default port +version: '3.4' + +services: + eshopwebmvc: + image: ${DOCKER_REGISTRY-}eshopwebmvc + build: + context: . + dockerfile: src/Web/Dockerfile + diff --git a/eShopOnWeb.sln b/eShopOnWeb.sln old mode 100644 new mode 100755 index 768d154..3ffe230 --- a/eShopOnWeb.sln +++ b/eShopOnWeb.sln @@ -27,6 +27,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Web", "src\Web\Web.csproj", "{227CF035-29B0-448D-97E4-944F9EA850E5}" EndProject +Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{1FCBE191-34FE-4B2E-8915-CA81553958AD}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,6 +59,10 @@ Global {227CF035-29B0-448D-97E4-944F9EA850E5}.Debug|Any CPU.Build.0 = Debug|Any CPU {227CF035-29B0-448D-97E4-944F9EA850E5}.Release|Any CPU.ActiveCfg = Release|Any CPU {227CF035-29B0-448D-97E4-944F9EA850E5}.Release|Any CPU.Build.0 = Release|Any CPU + {1FCBE191-34FE-4B2E-8915-CA81553958AD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1FCBE191-34FE-4B2E-8915-CA81553958AD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1FCBE191-34FE-4B2E-8915-CA81553958AD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1FCBE191-34FE-4B2E-8915-CA81553958AD}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Web/Properties/launchSettings.json b/src/Web/Properties/launchSettings.json index 5a578c5..6daa2f5 100644 --- a/src/Web/Properties/launchSettings.json +++ b/src/Web/Properties/launchSettings.json @@ -1,4 +1,4 @@ -{ +{ "iisSettings": { "windowsAuthentication": false, "anonymousAuthentication": true, @@ -18,10 +18,10 @@ "Web - PROD": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "https://localhost:5001;http://localhost:5000", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Production" - } + }, + "applicationUrl": "https://localhost:5001;http://localhost:5000" } } -} +} \ No newline at end of file