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.

230 lines
11 KiB

  1. version: '3.4'
  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. # IMPORTANT: Note that this compose file uses ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP instead of ESHOP_EXTERNAL_DNS_NAME_OR_IP
  9. # Set ASPNETCORE_ENVIRONMENT= Development or Production, depending if you want to show up errors while testing.
  10. #
  11. # You need to start it with the following CLI command:
  12. # docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
  13. services:
  14. basket.api:
  15. environment:
  16. - ASPNETCORE_ENVIRONMENT=Development
  17. - ASPNETCORE_URLS=http://0.0.0.0:80
  18. - ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:-basket.data}
  19. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  20. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  21. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  22. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  23. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  24. - AzureServiceBusEnabled=False
  25. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  26. - OrchestratorType=${ORCHESTRATOR_TYPE}
  27. - UseLoadTest=${USE_LOADTEST:-False}
  28. ports:
  29. - "5103:80"
  30. catalog.api:
  31. environment:
  32. - ASPNETCORE_ENVIRONMENT=Development
  33. - ASPNETCORE_URLS=http://0.0.0.0:80
  34. - ConnectionString=${ESHOP_AZURE_CATALOG_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
  35. - 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.
  36. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  37. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  38. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  39. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_CATALOG_NAME}
  40. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_CATALOG_KEY}
  41. - UseCustomizationData=True
  42. - AzureServiceBusEnabled=False
  43. - AzureStorageEnabled=False
  44. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  45. - OrchestratorType=${ORCHESTRATOR_TYPE}
  46. ports:
  47. - "5101:80"
  48. identity.api:
  49. environment:
  50. - ASPNETCORE_ENVIRONMENT=Development
  51. - ASPNETCORE_URLS=http://0.0.0.0:80
  52. - SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
  53. - XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always
  54. - ConnectionString=${ESHOP_AZURE_IDENTITY_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word}
  55. - MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5110.
  56. - LocationApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109
  57. - MarketingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
  58. - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  59. - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  60. - MobileShoppingAggClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5120
  61. - UseCustomizationData=True
  62. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  63. - OrchestratorType=${ORCHESTRATOR_TYPE}
  64. ports:
  65. - "5105:80"
  66. ordering.api:
  67. environment:
  68. - ASPNETCORE_ENVIRONMENT=Development
  69. - ASPNETCORE_URLS=http://0.0.0.0:80
  70. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  71. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  72. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  73. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  74. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  75. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  76. - UseCustomizationData=True
  77. - AzureServiceBusEnabled=False
  78. - CheckUpdateTime=30000
  79. - GracePeriodTime=1
  80. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  81. - OrchestratorType=${ORCHESTRATOR_TYPE}
  82. - UseLoadTest=${USE_LOADTEST:-False}
  83. ports:
  84. - "5102:80"
  85. marketing.api:
  86. environment:
  87. - ASPNETCORE_ENVIRONMENT=Development
  88. - ASPNETCORE_URLS=http://0.0.0.0:80
  89. - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
  90. - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  91. - MongoDatabase=MarketingDb
  92. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  93. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  94. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  95. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  96. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  97. - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
  98. - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
  99. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
  100. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
  101. - AzureServiceBusEnabled=False
  102. - AzureStorageEnabled=False
  103. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  104. - OrchestratorType=${ORCHESTRATOR_TYPE}
  105. - UseLoadTest=${USE_LOADTEST:-False}
  106. ports:
  107. - "5110:80"
  108. webspa:
  109. environment:
  110. - ASPNETCORE_ENVIRONMENT=Development
  111. - ASPNETCORE_URLS=http://0.0.0.0:80
  112. - CatalogUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5101
  113. - OrderingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  114. - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: You need to open your local dev-machine firewall at range 5100-5105. at range 5100-5105.
  115. - BasketUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  116. - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5110
  117. - LocationsUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5109
  118. - CatalogUrlHC=http://catalog.api/hc
  119. - OrderingUrlHC=http://ordering.api/hc
  120. - IdentityUrlHC=http://identity.api/hc
  121. - BasketUrlHC=http://basket.api/hc
  122. - MarketingUrlHC=http://marketing.api/hc
  123. - PaymentUrlHC=http://payment.api/hc
  124. - UseCustomizationData=True
  125. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  126. - OrchestratorType=${ORCHESTRATOR_TYPE}
  127. ports:
  128. - "5104:80"
  129. webmvc:
  130. environment:
  131. - ASPNETCORE_ENVIRONMENT=Development
  132. - ASPNETCORE_URLS=http://0.0.0.0:80
  133. - CatalogUrl=http://catalog.api
  134. - OrderingUrl=http://ordering.api
  135. - BasketUrl=http://basket.api
  136. - LocationsUrl=http://locations.api
  137. - IdentityUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105 #Local: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. #Remote: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
  138. - MarketingUrl=http://marketing.api
  139. - CatalogUrlHC=http://catalog.api/hc
  140. - OrderingUrlHC=http://ordering.api/hc
  141. - IdentityUrlHC=http://identity.api/hc
  142. - BasketUrlHC=http://basket.api/hc
  143. - MarketingUrlHC=http://marketing.api/hc
  144. - PaymentUrlHC=http://payment.api/hc
  145. - UseCustomizationData=True
  146. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  147. - OrchestratorType=${ORCHESTRATOR_TYPE}
  148. - UseLoadTest=${USE_LOADTEST:-False}
  149. ports:
  150. - "5100:80"
  151. webstatus:
  152. environment:
  153. - ASPNETCORE_ENVIRONMENT=Development
  154. - ASPNETCORE_URLS=http://0.0.0.0:80
  155. - CatalogUrl=http://catalog.api/hc
  156. - OrderingUrl=http://ordering.api/hc
  157. - BasketUrl=http://basket.api/hc
  158. - IdentityUrl=http://identity.api/hc
  159. - LocationsUrl=http://locations.api/hc
  160. - MarketingUrl=http://marketing.api/hc
  161. - PaymentUrl=http://payment.api/hc
  162. - mvc=http://webmvc/hc
  163. - spa=http://webspa/hc
  164. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  165. - OrchestratorType=${ORCHESTRATOR_TYPE}
  166. ports:
  167. - "5107:80"
  168. payment.api:
  169. environment:
  170. - ASPNETCORE_ENVIRONMENT=Development
  171. - ASPNETCORE_URLS=http://0.0.0.0:80
  172. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  173. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  174. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  175. - AzureServiceBusEnabled=False
  176. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  177. - OrchestratorType=${ORCHESTRATOR_TYPE}
  178. ports:
  179. - "5108:80"
  180. locations.api:
  181. environment:
  182. - ASPNETCORE_ENVIRONMENT=Development
  183. - ASPNETCORE_URLS=http://0.0.0.0:80
  184. - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  185. - Database=LocationsDb
  186. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  187. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  188. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  189. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  190. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  191. - AzureServiceBusEnabled=False
  192. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  193. - OrchestratorType=${ORCHESTRATOR_TYPE}
  194. - UseLoadTest=${USE_LOADTEST:-False}
  195. ports:
  196. - "5109:80"
  197. sql.data:
  198. environment:
  199. - MSSQL_SA_PASSWORD=Pass@word
  200. - ACCEPT_EULA=Y
  201. - MSSQL_PID=Developer
  202. ports:
  203. - "5433:1433"
  204. nosql.data:
  205. ports:
  206. - "27017:27017"
  207. basket.data:
  208. ports:
  209. - "6379:6379"
  210. rabbitmq:
  211. ports:
  212. - "15672:15672"
  213. - "5672:5672"