eShopOnContainers/src/docker-compose.yml

175 lines
4.1 KiB
YAML
Raw Normal View History

version: '3.4'
2017-05-08 10:48:06 +02:00
services:
2019-01-31 10:43:32 +00:00
seq:
image: datalust/seq:latest
2019-09-10 11:53:58 +02:00
sqldata:
image: mcr.microsoft.com/azure-sql-edge:latest
2019-09-10 11:53:58 +02:00
nosqldata:
image: mongo
2019-09-10 11:53:58 +02:00
basketdata:
image: redis:alpine
rabbitmq:
image: rabbitmq:3-management-alpine
2023-02-15 15:18:05 +01:00
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
broker:
image: confluentinc/cp-kafka:7.3.0
depends_on:
- zookeeper
2019-09-10 11:53:58 +02:00
identity-api:
2019-03-29 12:26:54 +01:00
image: ${REGISTRY:-eshop}/identity.api:${PLATFORM:-linux}-${TAG:-latest}
build:
context: .
2019-11-18 18:38:35 +00:00
dockerfile: Services/Identity/Identity.API/Dockerfile
depends_on:
2019-09-10 11:53:58 +02:00
- sqldata
2017-05-08 10:48:06 +02:00
2019-09-10 11:53:58 +02:00
basket-api:
2019-03-29 12:26:54 +01:00
image: ${REGISTRY:-eshop}/basket.api:${PLATFORM:-linux}-${TAG:-latest}
2017-05-19 19:32:42 +02:00
build:
context: .
2019-11-18 18:38:35 +00:00
dockerfile: Services/Basket/Basket.API/Dockerfile
depends_on:
2019-09-10 11:53:58 +02:00
- basketdata
- identity-api
- rabbitmq
- broker
2019-09-10 11:53:58 +02:00
catalog-api:
2019-03-29 12:26:54 +01:00
image: ${REGISTRY:-eshop}/catalog.api:${PLATFORM:-linux}-${TAG:-latest}
2017-05-19 19:32:42 +02:00
build:
context: .
2019-08-28 10:30:55 +02:00
dockerfile: Services/Catalog/Catalog.API/Dockerfile
depends_on:
2019-09-10 11:53:58 +02:00
- sqldata
- rabbitmq
Pt/finish kafka (#5) * Add kafka eventbus to Catalog, Ordering and Payment. Only catalog is confirmed to work, I think the ordering background service and payment are still subscribing to rabbitMQ for some reason (needs more investigation) * Fix kafka consumer group ids. * Fix build problems (duplicate package + lower version) All services seem to use Kafka now, but it seems like kafka takes to long to start up and the services fail to connect to the borkers (either we have to do retries similar like rabbitmq) or we are going to enforce the execution order in docker compose by using something like healthchecks. * Add kafka broker dependency for other services. Still have bug in eventBus subscription because for example the ordering service should handle a UserCheckoutAccepted event put it does have no subscription for it when such an event is published to the Kafka topic: ``` src-ordering-api-1 | [15:04:42 WRN] No subscription for Kafka event: UserCheckoutAccepted src-ordering-api-1 | Consumed event: UserCheckoutAccepted src-ordering-api-1 | Content: 632B63DB0CE145D499FE01904F76A475 ``` * Add logging for subscription manager problem. Seems like the subscription manager is not used correctly in the kafka eventbus (two different objects?). * add printing handlers * actually trigger printing handlers * add kafkapersistentconnection registration * Revert "add kafkapersistentconnection registration" This reverts commit 704ee3e36f09f3f3ad48057de31996654a8e3894. * add allowAutoCreateTopics in consumers (different than default) and in producers (just to be explicit) * register DefaultKafkaPersistentConnection in ordering.backgroundtasks * remove noise in logs * Make eventNames in kafka eventbus consistent. Do not remove IntegrationEventSuffix, before this change the subscription handlers and eventNames did not match. * Create kafka admin background service to create empty topic. We have to create the eshop_event_bus kafka topic on startup, because otherwise the consumer of the microservices would fail. --------- Co-authored-by: Philipp Theyssen <p.theyssen@gmail.com> Co-authored-by: Philipp Theyssen <34607877+PTheyssen@users.noreply.github.com>
2023-03-15 12:00:20 +01:00
- broker
2019-09-10 11:53:58 +02:00
ordering-api:
2019-03-29 12:26:54 +01:00
image: ${REGISTRY:-eshop}/ordering.api:${PLATFORM:-linux}-${TAG:-latest}
2017-05-19 19:32:42 +02:00
build:
context: .
2019-11-18 18:38:35 +00:00
dockerfile: Services/Ordering/Ordering.API/Dockerfile
depends_on:
2019-09-10 11:53:58 +02:00
- sqldata
2017-05-08 10:48:06 +02:00
- rabbitmq
Pt/finish kafka (#5) * Add kafka eventbus to Catalog, Ordering and Payment. Only catalog is confirmed to work, I think the ordering background service and payment are still subscribing to rabbitMQ for some reason (needs more investigation) * Fix kafka consumer group ids. * Fix build problems (duplicate package + lower version) All services seem to use Kafka now, but it seems like kafka takes to long to start up and the services fail to connect to the borkers (either we have to do retries similar like rabbitmq) or we are going to enforce the execution order in docker compose by using something like healthchecks. * Add kafka broker dependency for other services. Still have bug in eventBus subscription because for example the ordering service should handle a UserCheckoutAccepted event put it does have no subscription for it when such an event is published to the Kafka topic: ``` src-ordering-api-1 | [15:04:42 WRN] No subscription for Kafka event: UserCheckoutAccepted src-ordering-api-1 | Consumed event: UserCheckoutAccepted src-ordering-api-1 | Content: 632B63DB0CE145D499FE01904F76A475 ``` * Add logging for subscription manager problem. Seems like the subscription manager is not used correctly in the kafka eventbus (two different objects?). * add printing handlers * actually trigger printing handlers * add kafkapersistentconnection registration * Revert "add kafkapersistentconnection registration" This reverts commit 704ee3e36f09f3f3ad48057de31996654a8e3894. * add allowAutoCreateTopics in consumers (different than default) and in producers (just to be explicit) * register DefaultKafkaPersistentConnection in ordering.backgroundtasks * remove noise in logs * Make eventNames in kafka eventbus consistent. Do not remove IntegrationEventSuffix, before this change the subscription handlers and eventNames did not match. * Create kafka admin background service to create empty topic. We have to create the eshop_event_bus kafka topic on startup, because otherwise the consumer of the microservices would fail. --------- Co-authored-by: Philipp Theyssen <p.theyssen@gmail.com> Co-authored-by: Philipp Theyssen <34607877+PTheyssen@users.noreply.github.com>
2023-03-15 12:00:20 +01:00
- broker
2019-08-07 09:28:08 +02:00
2019-09-10 11:53:58 +02:00
ordering-backgroundtasks:
2019-08-07 09:28:08 +02:00
image: ${REGISTRY:-eshop}/ordering.backgroundtasks:${PLATFORM:-linux}-${TAG:-latest}
build:
context: .
2019-11-18 18:38:35 +00:00
dockerfile: Services/Ordering/Ordering.BackgroundTasks/Dockerfile
2019-08-07 09:28:08 +02:00
depends_on:
2019-09-10 11:53:58 +02:00
- sqldata
2019-08-07 09:28:08 +02:00
- rabbitmq
Pt/finish kafka (#5) * Add kafka eventbus to Catalog, Ordering and Payment. Only catalog is confirmed to work, I think the ordering background service and payment are still subscribing to rabbitMQ for some reason (needs more investigation) * Fix kafka consumer group ids. * Fix build problems (duplicate package + lower version) All services seem to use Kafka now, but it seems like kafka takes to long to start up and the services fail to connect to the borkers (either we have to do retries similar like rabbitmq) or we are going to enforce the execution order in docker compose by using something like healthchecks. * Add kafka broker dependency for other services. Still have bug in eventBus subscription because for example the ordering service should handle a UserCheckoutAccepted event put it does have no subscription for it when such an event is published to the Kafka topic: ``` src-ordering-api-1 | [15:04:42 WRN] No subscription for Kafka event: UserCheckoutAccepted src-ordering-api-1 | Consumed event: UserCheckoutAccepted src-ordering-api-1 | Content: 632B63DB0CE145D499FE01904F76A475 ``` * Add logging for subscription manager problem. Seems like the subscription manager is not used correctly in the kafka eventbus (two different objects?). * add printing handlers * actually trigger printing handlers * add kafkapersistentconnection registration * Revert "add kafkapersistentconnection registration" This reverts commit 704ee3e36f09f3f3ad48057de31996654a8e3894. * add allowAutoCreateTopics in consumers (different than default) and in producers (just to be explicit) * register DefaultKafkaPersistentConnection in ordering.backgroundtasks * remove noise in logs * Make eventNames in kafka eventbus consistent. Do not remove IntegrationEventSuffix, before this change the subscription handlers and eventNames did not match. * Create kafka admin background service to create empty topic. We have to create the eshop_event_bus kafka topic on startup, because otherwise the consumer of the microservices would fail. --------- Co-authored-by: Philipp Theyssen <p.theyssen@gmail.com> Co-authored-by: Philipp Theyssen <34607877+PTheyssen@users.noreply.github.com>
2023-03-15 12:00:20 +01:00
- broker
2018-05-09 20:10:54 +01:00
2019-09-10 11:53:58 +02:00
payment-api:
2019-03-29 12:26:54 +01:00
image: ${REGISTRY:-eshop}/payment.api:${PLATFORM:-linux}-${TAG:-latest}
2017-04-28 15:04:38 +02:00
build:
context: .
2019-08-28 10:30:55 +02:00
dockerfile: Services/Payment/Payment.API/Dockerfile
depends_on:
2019-11-18 18:38:35 +00:00
- rabbitmq
Pt/finish kafka (#5) * Add kafka eventbus to Catalog, Ordering and Payment. Only catalog is confirmed to work, I think the ordering background service and payment are still subscribing to rabbitMQ for some reason (needs more investigation) * Fix kafka consumer group ids. * Fix build problems (duplicate package + lower version) All services seem to use Kafka now, but it seems like kafka takes to long to start up and the services fail to connect to the borkers (either we have to do retries similar like rabbitmq) or we are going to enforce the execution order in docker compose by using something like healthchecks. * Add kafka broker dependency for other services. Still have bug in eventBus subscription because for example the ordering service should handle a UserCheckoutAccepted event put it does have no subscription for it when such an event is published to the Kafka topic: ``` src-ordering-api-1 | [15:04:42 WRN] No subscription for Kafka event: UserCheckoutAccepted src-ordering-api-1 | Consumed event: UserCheckoutAccepted src-ordering-api-1 | Content: 632B63DB0CE145D499FE01904F76A475 ``` * Add logging for subscription manager problem. Seems like the subscription manager is not used correctly in the kafka eventbus (two different objects?). * add printing handlers * actually trigger printing handlers * add kafkapersistentconnection registration * Revert "add kafkapersistentconnection registration" This reverts commit 704ee3e36f09f3f3ad48057de31996654a8e3894. * add allowAutoCreateTopics in consumers (different than default) and in producers (just to be explicit) * register DefaultKafkaPersistentConnection in ordering.backgroundtasks * remove noise in logs * Make eventNames in kafka eventbus consistent. Do not remove IntegrationEventSuffix, before this change the subscription handlers and eventNames did not match. * Create kafka admin background service to create empty topic. We have to create the eshop_event_bus kafka topic on startup, because otherwise the consumer of the microservices would fail. --------- Co-authored-by: Philipp Theyssen <p.theyssen@gmail.com> Co-authored-by: Philipp Theyssen <34607877+PTheyssen@users.noreply.github.com>
2023-03-15 12:00:20 +01:00
- broker
# webhooks-api:
# image: ${REGISTRY:-eshop}/webhooks.api:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Services/Webhooks/Webhooks.API/Dockerfile
# depends_on:
# - sqldata
#
# mobileshoppingapigw:
# image: envoyproxy/envoy:v1.16.0
#
# mobileshoppingagg:
# image: ${REGISTRY:-eshop}/mobileshoppingagg:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: ApiGateways/Mobile.Bff.Shopping/aggregator/Dockerfile
# depends_on:
# - nosqldata
# - sqldata
# - identity-api
# - rabbitmq
# - ordering-api
# - catalog-api
# - basket-api
#
# webshoppingagg:
# image: ${REGISTRY:-eshop}/webshoppingagg:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: ApiGateways/Web.Bff.Shopping/aggregator/Dockerfile
# depends_on:
# - nosqldata
# - sqldata
# - identity-api
# - rabbitmq
# - ordering-api
# - catalog-api
# - basket-api
#
# ordering-signalrhub:
# image: ${REGISTRY:-eshop}/ordering.signalrhub:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Services/Ordering/Ordering.SignalrHub/Dockerfile
# depends_on:
# - nosqldata
# - sqldata
# - identity-api
# - rabbitmq
# - ordering-api
# - catalog-api
# - basket-api
#
# webstatus:
# image: ${REGISTRY:-eshop}/webstatus:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Web/WebStatus/Dockerfile
#
# webspa:
# image: ${REGISTRY:-eshop}/webspa:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Web/WebSPA/Dockerfile
# args:
# NODE_IMAGE: ${NODE_IMAGE:-node:12.0}
# depends_on:
# - webshoppingagg
# - webshoppingapigw
#
# webmvc:
# image: ${REGISTRY:-eshop}/webmvc:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Web/WebMVC/Dockerfile
# depends_on:
# - webshoppingagg
# - webshoppingapigw
#
# webhooks-client:
# image: ${REGISTRY:-eshop}/webhooks.client:${PLATFORM:-linux}-${TAG:-latest}
# build:
# context: .
# dockerfile: Web/WebhookClient/Dockerfile
# depends_on:
# - webhooks-api
#
# webshoppingapigw:
# image: envoyproxy/envoy:v1.16.0