From 9c26f4802872e825c997ff18f482e724446811e9 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Wed, 25 Oct 2017 17:38:51 -0700 Subject: [PATCH] Updated 04. Setting eShopOnContainer solution up in a Mac, VS for Mac or with CLI environment (dotnet CLI, Docker CLI and VS Code) (markdown) --- ...t--(dotnet-CLI,-Docker-CLI-and-VS-Code).md | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md b/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md index 7ca7a10..0bcafde 100644 --- a/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md +++ b/04.-Setting-eShopOnContainer-solution-up-in-a-Mac,-VS-for-Mac-or-with-CLI-environment--(dotnet-CLI,-Docker-CLI-and-VS-Code).md @@ -289,8 +289,9 @@ In the `docker-compose.override.yml` file, replace the IdentityUrl environment v ```bash IdentityUrl=http://docker.for.mac.localhost:5105 ``` +You could also set your real IP at the Mac's network adapter. But that would be a worse solution as it'll depend on the network you are connecting your Mac development machine.. -The WebMVC service definition at the `docker-compose.override.yml` should finally be configured as shown bellow: +Therefoire, the WebMVC service definition at the `docker-compose.override.yml` should finally be configured as shown bellow: ```bash webmvc: @@ -316,11 +317,17 @@ The WebMVC service definition at the `docker-compose.override.yml` should finall ports: - "5100:80" ``` -If you re-deploy with `docker-compose up`, now the login page should work properly. + +If you re-deploy with `docker-compose up`, now the login page should work properly, as in the screenshot below: + +![image](https://user-images.githubusercontent.com/1712635/32029607-95d58f4e-b9aa-11e7-90a4-fea616c1a865.png) + # Configuring the app for external access from remote client apps -eShopOnContainers use the .env file to set certaing by-default environment variables used by the multiple docker-compose.override you can have. +If using the services from remote apps, like the a phone with the Xamarin mobile app in the same Wifi network, or the web apps accessing remotely to the Docker Host, you need to change a few by-default URLs. + +eShopOnContainers app uses the .env file to set certain by-default environment variables used by the multiple docker-compose.override you can have. Therefore, the following change must be done in the .env file at the root of the eShopOnContainers folder. If you don't see the .env file, run the following command and re-start the Finder: @@ -330,7 +337,16 @@ If you don't see the .env file, run the following command and re-start the Finde $ killall Finder ``` +Then, edit the .env file (with VS code, for instance) and change the ESHOP_EXTERNAL_DNS_NAME_OR_IP variable, and instead of using "localhost" as value, set a real IP or a real DNS name: + ` + ESHOP_EXTERNAL_DNS_NAME_OR_IP=192.168.0.25 + ` +or + ` + ESHOP_EXTERNAL_DNS_NAME_OR_IP=myserver.mydomain.com + ` +This is something you'll want to do if deploying to a real Docker Host, like in a VM in Azure, where you can use a DNS name for that. ## Sending feedback and pull requests