From b50be5d8588a2e99a8d1cb59a9134349fbd45fca Mon Sep 17 00:00:00 2001 From: Juliano Costa Date: Fri, 15 Mar 2024 14:03:38 +0100 Subject: [PATCH] [chore] Add depends_on flagd to all services using it (#1464) * Add depends_on flagd to all services using it * Remove FLAGD_ADDR from .env file --- .env | 1 + docker-compose.yml | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 41d77b0b8f..e1d268357f 100644 --- a/.env +++ b/.env @@ -65,6 +65,7 @@ FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_GRPC_SERVICE_PO # flagd FLAGD_HOST=flagd +FLAGD_PORT=8013 # Frontend FRONTEND_PORT=8080 diff --git a/docker-compose.yml b/docker-compose.yml index 80a26b47cb..74e1de6c0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,6 +63,7 @@ services: environment: - AD_SERVICE_PORT - FLAGD_HOST + - FLAGD_PORT - OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP} - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -71,6 +72,8 @@ services: depends_on: otelcol: condition: service_started + flagd: + condition: service_started logging: *logging # Cart service @@ -92,6 +95,7 @@ services: environment: - CART_SERVICE_PORT - FLAGD_HOST + - FLAGD_PORT - REDIS_ADDR - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_RESOURCE_ATTRIBUTES @@ -102,6 +106,8 @@ services: condition: service_started otelcol: condition: service_started + flagd: + condition: service_started logging: *logging # Checkout service @@ -122,6 +128,7 @@ services: - "${CHECKOUT_SERVICE_PORT}" environment: - FLAGD_HOST + - FLAGD_PORT - CHECKOUT_SERVICE_PORT - CART_SERVICE_ADDR - CURRENCY_SERVICE_ADDR @@ -151,6 +158,8 @@ services: condition: service_started kafka: condition: service_healthy + flagd: + condition: service_started logging: *logging # Currency service @@ -206,7 +215,7 @@ services: logging: *logging flagd: - image: ghcr.io/open-feature/flagd:latest + image: ghcr.io/open-feature/flagd:v0.9.0 container_name: flagd command: [ "start", @@ -393,6 +402,7 @@ services: environment: - PAYMENT_SERVICE_PORT - FLAGD_HOST + - FLAGD_PORT - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -400,6 +410,8 @@ services: depends_on: otelcol: condition: service_started + flagd: + condition: service_started logging: *logging # Product Catalog service @@ -421,6 +433,7 @@ services: environment: - PRODUCT_CATALOG_SERVICE_PORT - FLAGD_HOST + - FLAGD_PORT - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE - OTEL_RESOURCE_ATTRIBUTES @@ -428,6 +441,8 @@ services: depends_on: otelcol: condition: service_started + flagd: + condition: service_started logging: *logging # Quote service @@ -478,6 +493,7 @@ services: - RECOMMENDATION_SERVICE_PORT - PRODUCT_CATALOG_SERVICE_ADDR - FLAGD_HOST + - FLAGD_PORT - OTEL_PYTHON_LOG_CORRELATION=true - OTEL_EXPORTER_OTLP_ENDPOINT - OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE @@ -489,6 +505,8 @@ services: condition: service_started otelcol: condition: service_started + flagd: + condition: service_started logging: *logging # Shipping service @@ -763,6 +781,8 @@ services: condition: service_started frauddetectionservice: condition: service_started + flagd: + condition: service_started tracetest-server: image: ${TRACETEST_IMAGE}