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.

172 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. - CheckUpdateTime=30000
  64. - GracePeriodTime=1
  65. ports:
  66. - "5102:80"
  67. marketing.api:
  68. environment:
  69. - ASPNETCORE_ENVIRONMENT=Production
  70. - ASPNETCORE_URLS=http://0.0.0.0:80
  71. - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
  72. - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  73. - MongoDatabase=MarketingDb
  74. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  75. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  76. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  77. - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
  78. - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
  79. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
  80. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
  81. - AzureServiceBusEnabled=False
  82. - AzureStorageEnabled=False
  83. ports:
  84. - "5110:80"
  85. webspa:
  86. environment:
  87. - ASPNETCORE_ENVIRONMENT=Production
  88. - ASPNETCORE_URLS=http://0.0.0.0:80
  89. - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
  90. - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  91. - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your host's firewall at range 5100-5110.
  92. - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  93. - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
  94. - CatalogUrlHC=http://catalog.api/hc
  95. - OrderingUrlHC=http://ordering.api/hc
  96. - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  97. - BasketUrlHC=http://basket.api/hc
  98. - MarketingUrlHC=http://marketing.api/hc
  99. - UseCustomizationData=True
  100. ports:
  101. - "5104:80"
  102. webmvc:
  103. environment:
  104. - ASPNETCORE_ENVIRONMENT=Production
  105. - ASPNETCORE_URLS=http://0.0.0.0:80
  106. - CatalogUrl=http://catalog.api
  107. - OrderingUrl=http://ordering.api
  108. - BasketUrl=http://basket.api
  109. - 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.
  110. - MarketingUrl=http://marketing.api #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser.
  111. #Remote: Use ${ESHOP_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
  112. - UseCustomizationData=True
  113. ports:
  114. - "5100:80"
  115. sql.data:
  116. environment:
  117. - SA_PASSWORD=Pass@word
  118. - ACCEPT_EULA=Y
  119. - MSSQL_PID=Developer
  120. ports:
  121. - "5433:1433"
  122. nosql.data:
  123. ports:
  124. - "27017:27017"
  125. webstatus:
  126. environment:
  127. - ASPNETCORE_ENVIRONMENT=Production
  128. - ASPNETCORE_URLS=http://0.0.0.0:80
  129. - CatalogUrl=http://catalog.api/hc
  130. - OrderingUrl=http://ordering.api/hc
  131. - BasketUrl=http://basket.api/hc
  132. - IdentityUrl=http://identity.api/hc
  133. - LocationsUrl=http://locations.api/hc
  134. - MarketingUrl=http://marketing.api/hc
  135. - mvc=http://webmvc/hc
  136. - spa=http://webspa/hc
  137. ports:
  138. - "5107:80"
  139. payment.api:
  140. environment:
  141. - ASPNETCORE_ENVIRONMENT=Production
  142. - ASPNETCORE_URLS=http://0.0.0.0:5108
  143. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  144. - AzureServiceBusEnabled=False
  145. ports:
  146. - "5108:80"
  147. locations.api:
  148. environment:
  149. - ASPNETCORE_ENVIRONMENT=Production
  150. - ASPNETCORE_URLS=http://0.0.0.0:80
  151. - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  152. - Database=LocationsDb
  153. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  154. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  155. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  156. - AzureServiceBusEnabled=False
  157. ports:
  158. - "5109:80"