Skip to content

Commit

Permalink
[chore] Add depends_on flagd to all services using it (open-telemetry…
Browse files Browse the repository at this point in the history
…#1464)

* Add depends_on flagd to all services using it

* Remove FLAGD_ADDR from .env file
  • Loading branch information
julianocosta89 authored Mar 15, 2024
1 parent 5a0f85f commit b50be5d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 21 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -71,6 +72,8 @@ services:
depends_on:
otelcol:
condition: service_started
flagd:
condition: service_started
logging: *logging

# Cart service
Expand All @@ -92,6 +95,7 @@ services:
environment:
- CART_SERVICE_PORT
- FLAGD_HOST
- FLAGD_PORT
- REDIS_ADDR
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_RESOURCE_ATTRIBUTES
Expand All @@ -102,6 +106,8 @@ services:
condition: service_started
otelcol:
condition: service_started
flagd:
condition: service_started
logging: *logging

# Checkout service
Expand All @@ -122,6 +128,7 @@ services:
- "${CHECKOUT_SERVICE_PORT}"
environment:
- FLAGD_HOST
- FLAGD_PORT
- CHECKOUT_SERVICE_PORT
- CART_SERVICE_ADDR
- CURRENCY_SERVICE_ADDR
Expand Down Expand Up @@ -151,6 +158,8 @@ services:
condition: service_started
kafka:
condition: service_healthy
flagd:
condition: service_started
logging: *logging

# Currency service
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -393,13 +402,16 @@ services:
environment:
- PAYMENT_SERVICE_PORT
- FLAGD_HOST
- FLAGD_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=paymentservice
depends_on:
otelcol:
condition: service_started
flagd:
condition: service_started
logging: *logging

# Product Catalog service
Expand All @@ -421,13 +433,16 @@ services:
environment:
- PRODUCT_CATALOG_SERVICE_PORT
- FLAGD_HOST
- FLAGD_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
- OTEL_SERVICE_NAME=productcatalogservice
depends_on:
otelcol:
condition: service_started
flagd:
condition: service_started
logging: *logging

# Quote service
Expand Down Expand Up @@ -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
Expand All @@ -489,6 +505,8 @@ services:
condition: service_started
otelcol:
condition: service_started
flagd:
condition: service_started
logging: *logging

# Shipping service
Expand Down Expand Up @@ -763,6 +781,8 @@ services:
condition: service_started
frauddetectionservice:
condition: service_started
flagd:
condition: service_started

tracetest-server:
image: ${TRACETEST_IMAGE}
Expand Down

0 comments on commit b50be5d

Please sign in to comment.