From b07677ae83d51edec9c2d4cbe1194cbba3710ee9 Mon Sep 17 00:00:00 2001 From: Cesar De la Torre Date: Mon, 13 Mar 2017 16:43:40 -0700 Subject: [PATCH] Updates for the docker-compose production env. --- .env | 3 ++- docker-compose.prod.yml | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.env b/.env index 02550882f..d9482516b 100644 --- a/.env +++ b/.env @@ -2,6 +2,7 @@ # Compose expects each line in an env file to be in VAR=VAL format. Lines beginning with # (i.e. comments) are ignored, as are blank lines. # Note: Values present in the environment at runtime will always override those defined inside the .env file. Similarly, values passed via command-line arguments take precedence as well. -# localhost should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices +# The IP below should be swapped to your real IP or DNS name, like 192.168.88.248, etc. if testing from remote browsers or mobile devices + ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92 \ No newline at end of file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 9d3d29f09..14d8114ea 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -6,7 +6,7 @@ version: '2' # but values present in the environment vars at runtime will always override those defined inside the .env file # An external IP or DNS name has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. # -# ASPNETCORE_ENVIRONMENT=Development just to get errors while testing. Could be set to "Production" +# Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing. # # You need to start it with the following CLI command: # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d @@ -15,7 +15,7 @@ services: basket.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5103 - ConnectionString=basket.data - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. @@ -24,7 +24,7 @@ services: catalog.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5101 - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word - ExternalCatalogBaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. @@ -33,7 +33,7 @@ services: identity.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5105 - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104 - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word @@ -43,7 +43,7 @@ services: ordering.api: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5102 - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. @@ -52,7 +52,7 @@ services: webspa: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5104 - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101 - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102 @@ -63,7 +63,7 @@ services: webmvc: environment: - - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_ENVIRONMENT=Production - ASPNETCORE_URLS=http://0.0.0.0:5100 - CatalogUrl=http://catalog.api:5101 - OrderingUrl=http://ordering.api:5102