From f89c20ee64c2d5720ab5b11e0109ff21b5bc1c6f Mon Sep 17 00:00:00 2001 From: Eric Fleming Date: Tue, 30 Jun 2020 20:52:26 -0400 Subject: [PATCH] Update docker compose to include new Public API project (#414) * Updating docker compose and override to also start the public api * Update README --- README.md | 4 ++-- docker-compose.override.yml | 9 +++++++++ docker-compose.yml | 5 +++++ src/PublicApi/Properties/launchSettings.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7613a7944..6516ac892 100644 --- a/README.md +++ b/README.md @@ -99,9 +99,9 @@ You can run the Web sample by running these commands from the root folder (where docker-compose up ``` -You should be able to make requests to localhost:5106 once these commands complete. +You should be able to make requests to localhost:5106 for the Web project, and localhost:5200 for the Public API project once these commands complete. -You can also run the Web application by using the instructions located in its `Dockerfile` file in the root of the project. Again, run these commands from the root of the solution (where the .sln file is located). +You can also run the applications by using the instructions located in their `Dockerfile` file in the root of each project. Again, run these commands from the root of the solution (where the .sln file is located). ## Community Extensions We have some great contributions from the community, and while these aren't maintained by Microsoft we still want to highlight them. diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 006a17a31..182e0853d 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -6,6 +6,15 @@ services: - ASPNETCORE_URLS=http://+:80 ports: - "5106:80" + volumes: + - ~/.aspnet/https:/root/.aspnet/https:ro + - ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro + eshoppublicapi: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://+:80 + ports: + - "5200:80" 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 4a4d11357..2d99370cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,4 +6,9 @@ services: build: context: . dockerfile: src/Web/Dockerfile + eshoppublicapi: + image: ${DOCKER_REGISTRY-}eshoppublicapi + build: + context: . + dockerfile: src/PublicApi/Dockerfile diff --git a/src/PublicApi/Properties/launchSettings.json b/src/PublicApi/Properties/launchSettings.json index b3e9eeb31..098f4151f 100644 --- a/src/PublicApi/Properties/launchSettings.json +++ b/src/PublicApi/Properties/launchSettings.json @@ -24,7 +24,7 @@ "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" }, - "applicationUrl": "https://localhost:5001;http://localhost:5000" + "applicationUrl": "https://localhost:5099;http://localhost:5098" }, "Docker": { "commandName": "Docker",