You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

170 lines
7.8 KiB

  1. version: '2.1'
  2. # The Production docker-compose file has to have the external/real IPs or DNS names for the services
  3. # The ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP environment variable is taken, by default, from the ".env" file defined like:
  4. # ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=192.168.88.248
  5. # but values present in the environment vars at runtime will always override those defined inside the .env file
  6. # 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.
  7. #
  8. # Set ASPNETCORE_ENVIRONMENT=Development to get errors while testing.
  9. #
  10. # You need to start it with the following CLI command:
  11. # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
  12. services:
  13. basket.api:
  14. environment:
  15. - ASPNETCORE_ENVIRONMENT=Production
  16. - ASPNETCORE_URLS=http://0.0.0.0:80
  17. - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data}
  18. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  19. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  20. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  21. - AzureServiceBusEnabled=False
  22. ports:
  23. - "5103:80"
  24. catalog.api:
  25. environment:
  26. - ASPNETCORE_ENVIRONMENT=Production
  27. - ASPNETCORE_URLS=http://0.0.0.0:80
  28. - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
  29. - PicBaseUrl=${ESHOP_AZURE_STORAGE_CATALOG_URL:-http://localhost:5101/api/v1/catalog/items/[0]/pic/} #Local: You need to open your local dev-machine firewall at range 5100-5110.
  30. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  31. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME}
  32. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
  33. - UseCustomizationData=True
  34. - AzureServiceBusEnabled=False
  35. - AzureStorageEnabled=False
  36. ports:
  37. - "5101:80"
  38. identity.api:
  39. environment:
  40. - ASPNETCORE_ENVIRONMENT=Production
  41. - ASPNETCORE_URLS=http://0.0.0.0:80
  42. - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
  43. - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback
  44. - ConnectionStrings__DefaultConnection=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
  45. - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110.
  46. - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109
  47. - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
  48. - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  49. - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  50. - UseCustomizationData=True
  51. ports:
  52. - "5105:80"
  53. ordering.api:
  54. environment:
  55. - ASPNETCORE_ENVIRONMENT=Production
  56. - ASPNETCORE_URLS=http://0.0.0.0:80
  57. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  58. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  59. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  60. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  61. - UseCustomizationData=True
  62. - AzureServiceBusEnabled=False
  63. ports:
  64. - "5102:80"
  65. marketing.api:
  66. environment:
  67. - ASPNETCORE_ENVIRONMENT=Production
  68. - ASPNETCORE_URLS=http://0.0.0.0:80
  69. - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
  70. - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  71. - MongoDatabase=MarketingDb
  72. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  73. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  74. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  75. - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
  76. - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
  77. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
  78. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
  79. - AzureServiceBusEnabled=False
  80. - AzureStorageEnabled=False
  81. ports:
  82. - "5110:80"
  83. webspa:
  84. environment:
  85. - ASPNETCORE_ENVIRONMENT=Production
  86. - ASPNETCORE_URLS=http://0.0.0.0:80
  87. - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
  88. - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  89. - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5110.
  90. - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  91. - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
  92. - CatalogUrlHC=http://catalog.api/hc
  93. - OrderingUrlHC=http://ordering.api/hc
  94. - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  95. - BasketUrlHC=http://basket.api/hc
  96. - MarketingUrlHC=http://marketing.api/hc
  97. - UseCustomizationData=True
  98. ports:
  99. - "5104:80"
  100. webmvc:
  101. environment:
  102. - ASPNETCORE_ENVIRONMENT=Production
  103. - ASPNETCORE_URLS=http://0.0.0.0:80
  104. - CatalogUrl=http://catalog.api
  105. - OrderingUrl=http://ordering.api
  106. - BasketUrl=http://basket.api
  107. - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  108. - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
  109. #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
  110. - UseCustomizationData=True
  111. ports:
  112. - "5100:80"
  113. sql.data:
  114. environment:
  115. - SA_PASSWORD=Pass@word
  116. - ACCEPT_EULA=Y
  117. - MSSQL_PID=Developer
  118. ports:
  119. - "5433:1433"
  120. nosql.data:
  121. ports:
  122. - "27017:27017"
  123. webstatus:
  124. environment:
  125. - ASPNETCORE_ENVIRONMENT=Production
  126. - ASPNETCORE_URLS=http://0.0.0.0:80
  127. - CatalogUrl=http://catalog.api/hc
  128. - OrderingUrl=http://ordering.api/hc
  129. - BasketUrl=http://basket.api/hc
  130. - IdentityUrl=http://identity.api/hc
  131. - LocationsUrl=http://locations.api/hc
  132. - MarketingUrl=http://marketing.api/hc
  133. - mvc=http://webmvc/hc
  134. - spa=http://webspa/hc
  135. ports:
  136. - "5107:80"
  137. payment.api:
  138. environment:
  139. - ASPNETCORE_ENVIRONMENT=Production
  140. - ASPNETCORE_URLS=http://0.0.0.0:5108
  141. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  142. - AzureServiceBusEnabled=False
  143. ports:
  144. - "5108:80"
  145. locations.api:
  146. environment:
  147. - ASPNETCORE_ENVIRONMENT=Production
  148. - ASPNETCORE_URLS=http://0.0.0.0:80
  149. - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  150. - Database=LocationsDb
  151. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  152. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  153. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  154. - AzureServiceBusEnabled=False
  155. ports:
  156. - "5109:80"