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.

308 lines
16 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
  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=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. - "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=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_PROD_EXTERNAL_DNS_NAME_OR_IP}:5120
  61. - WebShoppingAggClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5121
  62. - UseCustomizationData=True
  63. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  64. - OrchestratorType=${ORCHESTRATOR_TYPE}
  65. ports:
  66. - "5105:80"
  67. ordering.api:
  68. environment:
  69. - ASPNETCORE_ENVIRONMENT=Development
  70. - ASPNETCORE_URLS=http://0.0.0.0:80
  71. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  72. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  73. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  74. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  75. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  76. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  77. - UseCustomizationData=True
  78. - AzureServiceBusEnabled=False
  79. - CheckUpdateTime=30000
  80. - GracePeriodTime=1
  81. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  82. - OrchestratorType=${ORCHESTRATOR_TYPE}
  83. - UseLoadTest=${USE_LOADTEST:-False}
  84. ports:
  85. - "80" # The API Gateway redirects and access through the internal port (80).
  86. ordering.backgroundtasks:
  87. environment:
  88. - ASPNETCORE_ENVIRONMENT=Development
  89. - ASPNETCORE_URLS=http://0.0.0.0:80
  90. - ConnectionString=${ESHOP_AZURE_ORDERING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word}
  91. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  92. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  93. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  94. - UseCustomizationData=True
  95. - AzureServiceBusEnabled=False
  96. - CheckUpdateTime=30000
  97. - GracePeriodTime=1
  98. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  99. - OrchestratorType=${ORCHESTRATOR_TYPE}
  100. - UseLoadTest=${USE_LOADTEST:-False}
  101. ports:
  102. - "5111:80"
  103. marketing.api:
  104. environment:
  105. - ASPNETCORE_ENVIRONMENT=Development
  106. - ASPNETCORE_URLS=http://0.0.0.0:80
  107. - ConnectionString=${ESHOP_AZURE_MARKETING_DB:-Server=sql.data;Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=sa;Password=Pass@word}
  108. - MongoConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  109. - MongoDatabase=MarketingDb
  110. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  111. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  112. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  113. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  114. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  115. - CampaignDetailFunctionUri=${ESHOP_AZUREFUNC_CAMPAIGN_DETAILS_URI}
  116. - PicBaseUrl=${ESHOP_AZURE_STORAGE_MARKETING_URL:-http://localhost:5110/api/v1/campaigns/[0]/pic/}
  117. - AzureStorageAccountName=${ESHOP_AZURE_STORAGE_MARKETING_NAME}
  118. - AzureStorageAccountKey=${ESHOP_AZURE_STORAGE_MARKETING_KEY}
  119. - AzureServiceBusEnabled=False
  120. - AzureStorageEnabled=False
  121. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  122. - OrchestratorType=${ORCHESTRATOR_TYPE}
  123. - UseLoadTest=${USE_LOADTEST:-False}
  124. ports:
  125. - "80" # The API Gateway redirects and access through the internal port (80).
  126. webspa:
  127. environment:
  128. - ASPNETCORE_ENVIRONMENT=Development
  129. - ASPNETCORE_URLS=http://0.0.0.0:80
  130. - 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.
  131. - PurchaseUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5202
  132. - MarketingUrl=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5203
  133. - CatalogUrlHC=http://catalog.api/hc
  134. - OrderingUrlHC=http://ordering.api/hc
  135. - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  136. - BasketUrlHC=http://basket.api/hc
  137. - MarketingUrlHC=http://marketing.api/hc
  138. - PaymentUrlHC=http://payment.api/hc
  139. - UseCustomizationData=True
  140. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  141. - OrchestratorType=${ORCHESTRATOR_TYPE}
  142. ports:
  143. - "5104:80"
  144. webmvc:
  145. environment:
  146. - ASPNETCORE_ENVIRONMENT=Development
  147. - ASPNETCORE_URLS=http://0.0.0.0:80
  148. - PurchaseUrl=http://webshoppingapigw
  149. - 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.
  150. - MarketingUrl=http://webmarketingapigw
  151. - CatalogUrlHC=http://catalog.api/hc
  152. - OrderingUrlHC=http://ordering.api/hc
  153. - IdentityUrlHC=http://identity.api/hc #Local: Use ${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}, if using external IP or DNS name from browser.
  154. - BasketUrlHC=http://basket.api/hc
  155. - MarketingUrlHC=http://marketing.api/hc
  156. - PaymentUrlHC=http://payment.api/hc
  157. - UseCustomizationData=True
  158. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  159. - OrchestratorType=${ORCHESTRATOR_TYPE}
  160. - UseLoadTest=${USE_LOADTEST:-False}
  161. ports:
  162. - "5100:80"
  163. webstatus:
  164. environment:
  165. - ASPNETCORE_ENVIRONMENT=Development
  166. - ASPNETCORE_URLS=http://0.0.0.0:80
  167. - CatalogUrl=http://catalog.api/hc
  168. - OrderingUrl=http://ordering.api/hc
  169. - OrderingBackgroundTasksUrl=http://ordering.backgroundtasks/hc
  170. - BasketUrl=http://basket.api/hc
  171. - IdentityUrl=http://identity.api/hc
  172. - LocationsUrl=http://locations.api/hc
  173. - MarketingUrl=http://marketing.api/hc
  174. - PaymentUrl=http://payment.api/hc
  175. - mvc=http://webmvc/hc
  176. - spa=http://webspa/hc
  177. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  178. - OrchestratorType=${ORCHESTRATOR_TYPE}
  179. ports:
  180. - "5107:80"
  181. payment.api:
  182. environment:
  183. - ASPNETCORE_ENVIRONMENT=Development
  184. - ASPNETCORE_URLS=http://0.0.0.0:80
  185. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  186. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  187. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  188. - AzureServiceBusEnabled=False
  189. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  190. - OrchestratorType=${ORCHESTRATOR_TYPE}
  191. ports:
  192. - "80" # The API Gateway redirects and access through the internal port (80).
  193. locations.api:
  194. environment:
  195. - ASPNETCORE_ENVIRONMENT=Development
  196. - ASPNETCORE_URLS=http://0.0.0.0:80
  197. - ConnectionString=${ESHOP_AZURE_COSMOSDB:-mongodb://nosql.data}
  198. - Database=LocationsDb
  199. - identityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  200. - IdentityUrlExternal=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105
  201. - EventBusConnection=${ESHOP_AZURE_SERVICE_BUS:-rabbitmq}
  202. - EventBusUserName=${ESHOP_SERVICE_BUS_USERNAME}
  203. - EventBusPassword=${ESHOP_SERVICE_BUS_PASSWORD}
  204. - AzureServiceBusEnabled=False
  205. - ApplicationInsights__InstrumentationKey=${INSTRUMENTATION_KEY}
  206. - OrchestratorType=${ORCHESTRATOR_TYPE}
  207. - UseLoadTest=${USE_LOADTEST:-False}
  208. ports:
  209. - "80" # The API Gateway redirects and access through the internal port (80).
  210. sql.data:
  211. environment:
  212. - SA_PASSWORD=Pass@word
  213. - ACCEPT_EULA=Y
  214. ports:
  215. - "5433:1433" # Important: In a production environment your should remove the external port
  216. nosql.data:
  217. ports:
  218. - "27017:27017" # Important: In a production environment your should remove the external port
  219. basket.data:
  220. ports:
  221. - "6379:6379" # Important: In a production environment your should remove the external port
  222. rabbitmq:
  223. ports:
  224. - "15672:15672" # Important: In a production environment your should remove the external port
  225. - "5672:5672" # Important: In a production environment your should remove the external port
  226. mobileshoppingapigw:
  227. environment:
  228. - ASPNETCORE_ENVIRONMENT=Development
  229. - IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  230. ports:
  231. - "5200:80" # Important: In a production environment your should remove the external port (5200) kept here for microservice debugging purposes.
  232. # The API Gateway redirects and access through the internal port (80).
  233. volumes:
  234. - ./src/ApiGateways/Mobile.Bff.Shopping/apigw:/app/configuration
  235. mobilemarketingapigw:
  236. environment:
  237. - ASPNETCORE_ENVIRONMENT=Development
  238. - IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  239. ports:
  240. - "5201:80" # Important: In a production environment your should remove the external port (5201) kept here for microservice debugging purposes.
  241. # The API Gateway redirects and access through the internal port (80).
  242. volumes:
  243. - ./src/ApiGateways/Mobile.Bff.Marketing/apigw:/app/configuration
  244. webshoppingapigw:
  245. environment:
  246. - ASPNETCORE_ENVIRONMENT=Development
  247. - IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  248. ports:
  249. - "5202:80" # Important: In a production environment your should remove the external port (5202) kept here for microservice debugging purposes.
  250. # The API Gateway redirects and access through the internal port (80).
  251. volumes:
  252. - ./src/ApiGateways/Web.Bff.Shopping/apigw:/app/configuration
  253. webmarketingapigw:
  254. environment:
  255. - ASPNETCORE_ENVIRONMENT=Development
  256. - IdentityUrl=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  257. ports:
  258. - "5203:80" # Important: In a production environment your should remove the external port (5203) kept here for microservice debugging purposes.
  259. # The API Gateway redirects and access through the internal port (80).
  260. volumes:
  261. - ./src/ApiGateways/Web.Bff.Marketing/apigw:/app/configuration
  262. mobileshoppingagg:
  263. environment:
  264. - ASPNETCORE_ENVIRONMENT=Development
  265. - urls__basket=http://basket.api
  266. - urls__catalog=http://catalog.api
  267. - urls__orders=http://ordering.api
  268. - urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  269. ports:
  270. - "80" # Important: In a production environment your should remove the external port (5120) kept here for microservice debugging purposes.
  271. # The API Gateway redirects and access through the internal port (80).
  272. webshoppingagg:
  273. environment:
  274. - ASPNETCORE_ENVIRONMENT=Development
  275. - urls__basket=http://basket.api
  276. - urls__catalog=http://catalog.api
  277. - urls__orders=http://ordering.api
  278. - urls__identity=http://identity.api #Local: You need to open your local dev-machine firewall at range 5100-5110.
  279. ports:
  280. - "80" # Important: In a production environment your should remove the external port (5121) kept here for microservice debugging purposes.
  281. # The API Gateway redirects and access through the internal port (80).