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.

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