Browse Source

Get the correct config running and finish final tests

pull/182/head
Bill Wagner 7 years ago
parent
commit
b87e89e53a
4 changed files with 20 additions and 8 deletions
  1. +8
    -0
      src/Web/Catalog.WebForms/.env
  2. +8
    -1
      src/Web/Catalog.WebForms/Catalog.WebForms/Services/CatalogService.cs
  3. +3
    -3
      src/Web/Catalog.WebForms/docker-compose.override.yml
  4. +1
    -4
      src/Web/Catalog.WebForms/docker-compose.yml

+ 8
- 0
src/Web/Catalog.WebForms/.env View File

@ -0,0 +1,8 @@
# Compose supports declaring default environment variables in an environment file named .env placed in the folder docker-compose command is executed from (current working directory).
# 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.
# 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=192.168.1.103
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92

+ 8
- 1
src/Web/Catalog.WebForms/Catalog.WebForms/Services/CatalogService.cs View File

@ -75,7 +75,14 @@ namespace eShopOnContainers.Core.Services.Catalog
public Task<CatalogItem> GetCatalogItemAsync(string id)
{
throw new NotImplementedException();
var baseURl = System.Configuration.ConfigurationManager.AppSettings["CatalogURL"];
UriBuilder builder = new UriBuilder(baseURl);
builder.Path = $"api/v1/catalog/items/{id}";
string uri = builder.ToString();
return _requestProvider.GetAsync<CatalogItem>(uri);
}
public async Task<ObservableCollection<CatalogBrand>> GetCatalogBrandAsync()


+ 3
- 3
src/Web/Catalog.WebForms/docker-compose.override.yml View File

@ -13,9 +13,9 @@ services:
- ASPNETCORE_ENVIRONMENT=Development
- 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://localhost:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
#- ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- EventBusConnection=172.24.176.5 # rabbitmq
#- ExternalCatalogBaseUrl=http://localhost:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- ExternalCatalogBaseUrl=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5101 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
- EventBusConnection=rabbitmq
ports:
- "5101:5101"


+ 1
- 4
src/Web/Catalog.WebForms/docker-compose.yml View File

@ -22,10 +22,7 @@ services:
image: eshop/rabbitmq-win
ports:
- "5672:5672"
networks:
default:
ipv4_address: 172.24.176.5
sql.data:
image: microsoft/mssql-server-windows


Loading…
Cancel
Save