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.

235 lines
11 KiB

5 years ago
5 years ago
5 years ago
  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
  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. - "80" # The API Gateway redirects and access through the internal port (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=sqldata;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word}
  35. - PicBaseUrl=${ESHOP_STORAGE_CATALOG_URL}
  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. - "80" # The API Gateway redirects and access through the internal port (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=sqldata;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. - BasketApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5103
  57. - OrderingApiClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5102
  58. - MobileShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5120
  59. - WebShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5121
  60. - UseCustomizationData=True
  61. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  62. - OrchestratorType=${ORCHESTRATOR_TYPE}
  63. ports:
  64. - "5105:80"
  65. ordering-api:
  66. environment:
  67. - ASPNETCORE_ENVIRONMENT=Development
  68. - ASPNETCORE_URLS=http://0.0.0.0:80
  69. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  70. - identityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  71. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  72. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  73. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  74. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  75. - UseCustomizationData=True
  76. - AzureServiceBusEnabled=False
  77. - CheckUpdateTime=30000
  78. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  79. - OrchestratorType=${ORCHESTRATOR_TYPE}
  80. - UseLoadTest=${USE_LOADTEST:-False}
  81. ports:
  82. - "80" # The API Gateway redirects and access through the internal port (80).
  83. ordering.backgroundtasks:
  84. environment:
  85. - ASPNETCORE_ENVIRONMENT=Development
  86. - ASPNETCORE_URLS=http://0.0.0.0:80
  87. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sqldata;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  88. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  89. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  90. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  91. - UseCustomizationData=True
  92. - AzureServiceBusEnabled=False
  93. - CheckUpdateTime=30000
  94. - GracePeriodTime=1
  95. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  96. - OrchestratorType=${ORCHESTRATOR_TYPE}
  97. - UseLoadTest=${USE_LOADTEST:-False}
  98. ports:
  99. - "5111:80"
  100. webspa:
  101. environment:
  102. - ASPNETCORE_ENVIRONMENT=Development
  103. - ASPNETCORE_URLS=http://0.0.0.0:80
  104. - 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.
  105. - PurchaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5202
  106. - CatalogUrlHC=http://catalog-api/hc
  107. - OrderingUrlHC=http://ordering-api/hc
  108. - IdentityUrlHC=http://identity-api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  109. - BasketUrlHC=http://basket-api/hc
  110. - PaymentUrlHC=http://payment-api/hc
  111. - UseCustomizationData=True
  112. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  113. - OrchestratorType=${ORCHESTRATOR_TYPE}
  114. ports:
  115. - "5104:80"
  116. webmvc:
  117. environment:
  118. - ASPNETCORE_ENVIRONMENT=Development
  119. - ASPNETCORE_URLS=http://0.0.0.0:80
  120. - PurchaseUrl=http://webshoppingapigw
  121. - IdentityUrl=http://10.0.75.1:5105 # Local Mac: Use http://docker.for.mac.localhost:5105 || Local Windows: Use 10.0.75.1 in a "Docker for Windows" environment, if using "localhost" from browser. || #Remote access: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP} if using external IP or DNS name from browser.
  122. - CatalogUrlHC=http://catalog-api/hc
  123. - OrderingUrlHC=http://ordering-api/hc
  124. - IdentityUrlHC=http://identity-api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  125. - BasketUrlHC=http://basket-api/hc
  126. - PaymentUrlHC=http://payment-api/hc
  127. - UseCustomizationData=True
  128. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  129. - OrchestratorType=${ORCHESTRATOR_TYPE}
  130. - UseLoadTest=${USE_LOADTEST:-False}
  131. ports:
  132. - "5100:80"
  133. webstatus:
  134. environment:
  135. - ASPNETCORE_ENVIRONMENT=Development
  136. - ASPNETCORE_URLS=http://0.0.0.0:80
  137. - CatalogUrl=http://catalog-api/hc
  138. - OrderingUrl=http://ordering-api/hc
  139. - BasketUrl=http://basket-api/hc
  140. - IdentityUrl=http://identity-api/hc
  141. - PaymentUrl=http://payment-api/hc
  142. - mvc=http://webmvc/hc
  143. - spa=http://webspa/hc
  144. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  145. - OrchestratorType=${ORCHESTRATOR_TYPE}
  146. ports:
  147. - "5107:80"
  148. payment-api:
  149. environment:
  150. - ASPNETCORE_ENVIRONMENT=Development
  151. - ASPNETCORE_URLS=http://0.0.0.0:80
  152. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  153. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  154. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  155. - AzureServiceBusEnabled=False
  156. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  157. - OrchestratorType=${ORCHESTRATOR_TYPE}
  158. ports:
  159. - "80" # The API Gateway redirects and access through the internal port (80).
  160. sqldata:
  161. environment:
  162. - SA_PASSWORD=Pass@word
  163. - ACCEPT_EULA=Y
  164. ports:
  165. - "5433:1433" # Important: In a production environment your should remove the external port
  166. nosqldata:
  167. ports:
  168. - "27017:27017" # Important: In a production environment your should remove the external port
  169. basket.data:
  170. ports:
  171. - "6379:6379" # Important: In a production environment your should remove the external port
  172. rabbitmq:
  173. ports:
  174. - "15672:15672" # Important: In a production environment your should remove the external port
  175. - "5672:5672" # Important: In a production environment your should remove the external port
  176. mobileshoppingapigw:
  177. environment:
  178. - ASPNETCORE_ENVIRONMENT=Development
  179. - IdentityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  180. ports:
  181. - "5200:80" # Important: In a production environment your should remove the external port (5200) kept here for microservice debugging purposes.
  182. # The API Gateway redirects and access through the internal port (80).
  183. volumes:
  184. - ./ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
  185. webshoppingapigw:
  186. environment:
  187. - ASPNETCORE_ENVIRONMENT=Development
  188. - IdentityUrl=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  189. ports:
  190. - "5202:80" # Important: In a production environment your should remove the external port (5202) kept here for microservice debugging purposes.
  191. # The API Gateway redirects and access through the internal port (80).
  192. volumes:
  193. - ./ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
  194. mobileshoppingagg:
  195. environment:
  196. - ASPNETCORE_ENVIRONMENT=Development
  197. - urls__basket=http://basket-api
  198. - urls__catalog=http://catalog-api
  199. - urls__orders=http://ordering-api
  200. - urls__identity=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  201. ports:
  202. - "80" # Important: In a production environment your should remove the external port (5120) kept here for microservice debugging purposes.
  203. # The API Gateway redirects and access through the internal port (80).
  204. webshoppingagg:
  205. environment:
  206. - ASPNETCORE_ENVIRONMENT=Development
  207. - urls__basket=http://basket-api
  208. - urls__catalog=http://catalog-api
  209. - urls__orders=http://ordering-api
  210. - urls__identity=http://identity-api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  211. ports:
  212. - "80" # Important: In a production environment your should remove the external port (5121) kept here for microservice debugging purposes.
  213. # The API Gateway redirects and access through the internal port (80).