#
# docker-compose.override.yml is used to set up local configuration environment
# Things like the external ports to use or secrets/passwords depend on the 
# specific deployment environment you might be using.
# Further details and docs: https://docs.docker.com/compose/extends/ 
#

version: '2'

services:

  webmvc:
    environment:
      - CatalogUrl=http://catalog.api:5101
      - OrderingUrl=http://ordering.api:5102
      #- IdentityUrl=http://13.88.8.119:5105             #Remote: VM Needs to have public access at 5105. 
      - IdentityUrl=http://10.0.75.1:5105              #Local: You need to open your local dev-machine firewall at range 5100-5105.  at range 5100-5105. 
      - BasketUrl=http://basket.api:5103
    ports:
      - "5100:5100"

  webspa:
    environment:
      - CatalogUrl=http://10.0.75.1:5101
      - OrderingUrl=http://10.0.75.1:5102
      #- IdentityUrl=http://13.88.8.119:5105             #Remote: VM Needs to have public access at 5105. 
      - IdentityUrl=http://10.0.75.1:5105              #Local: You need to open your local dev-machine firewall at range 5100-5105.  at range 5100-5105. 
      - BasketUrl=http://10.0.75.1:5103                
    ports:
      - "5104:5104"

  basket.api:
    environment:
      - ConnectionString=basket.data
      #- identityUrl=http://13.88.8.119:5105             #Remote: VM Needs to have public access at 5105. 
      - identityUrl=http://10.0.75.1:5105              #Local: You need to open your local dev-machine firewall at range 5100-5105.  at range 5100-5105. 
    ports:
      - "5103:5103"

  catalog.api:
    environment:
      - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word
      #- ExternalCatalogBaseUrl=http://13.88.8.119:5101   #Remote: VM Needs to have public access at 5105. 
      - ExternalCatalogBaseUrl=http://10.0.75.1:5101    #Local: You need to open your local dev-machine firewall at range 5100-5105.  at range 5100-5105.
    ports:
      - "5101:5101"

  ordering.api:
    environment:
      - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word
      #- identityUrl=http://13.88.8.119:5105             #Remote: VM Needs to have public access at 5105. 
      - identityUrl=http://10.0.75.1:5105              #Local: You need to open your local dev-machine firewall at range 5100-5105.  at range 5100-5105. 
    ports:
      - "5102:5102"

  identity.service:
    environment:
      - SpaClient=http://localhost:5104
      - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
      #- MvcClient=http://13.88.8.119:5100              #Remote: VM Needs to have public access at 5105. 
      - MvcClient=http://10.0.75.1:5105              #Local: You need to open your local dev-machine firewall at range 5100-5105.  
    ports:
      - "5105:5105"

  sql.data:
    environment:
      - SA_PASSWORD=Pass@word
      - ACCEPT_EULA=Y
    ports:
      - "5433:1433"