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.

305 lines
15 KiB

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