Skip to content

Commit b50be5d

Browse files
[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
1 parent 5a0f85f commit b50be5d

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.env

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ FEATURE_FLAG_GRPC_SERVICE_ADDR=featureflagservice:${FEATURE_FLAG_GRPC_SERVICE_PO
6565

6666
# flagd
6767
FLAGD_HOST=flagd
68+
FLAGD_PORT=8013
6869

6970
# Frontend
7071
FRONTEND_PORT=8080

docker-compose.yml

+21-1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ services:
6363
environment:
6464
- AD_SERVICE_PORT
6565
- FLAGD_HOST
66+
- FLAGD_PORT
6667
- OTEL_EXPORTER_OTLP_ENDPOINT=http://${OTEL_COLLECTOR_HOST}:${OTEL_COLLECTOR_PORT_HTTP}
6768
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
6869
- OTEL_RESOURCE_ATTRIBUTES
@@ -71,6 +72,8 @@ services:
7172
depends_on:
7273
otelcol:
7374
condition: service_started
75+
flagd:
76+
condition: service_started
7477
logging: *logging
7578

7679
# Cart service
@@ -92,6 +95,7 @@ services:
9295
environment:
9396
- CART_SERVICE_PORT
9497
- FLAGD_HOST
98+
- FLAGD_PORT
9599
- REDIS_ADDR
96100
- OTEL_EXPORTER_OTLP_ENDPOINT
97101
- OTEL_RESOURCE_ATTRIBUTES
@@ -102,6 +106,8 @@ services:
102106
condition: service_started
103107
otelcol:
104108
condition: service_started
109+
flagd:
110+
condition: service_started
105111
logging: *logging
106112

107113
# Checkout service
@@ -122,6 +128,7 @@ services:
122128
- "${CHECKOUT_SERVICE_PORT}"
123129
environment:
124130
- FLAGD_HOST
131+
- FLAGD_PORT
125132
- CHECKOUT_SERVICE_PORT
126133
- CART_SERVICE_ADDR
127134
- CURRENCY_SERVICE_ADDR
@@ -151,6 +158,8 @@ services:
151158
condition: service_started
152159
kafka:
153160
condition: service_healthy
161+
flagd:
162+
condition: service_started
154163
logging: *logging
155164

156165
# Currency service
@@ -206,7 +215,7 @@ services:
206215
logging: *logging
207216

208217
flagd:
209-
image: ghcr.io/open-feature/flagd:latest
218+
image: ghcr.io/open-feature/flagd:v0.9.0
210219
container_name: flagd
211220
command: [
212221
"start",
@@ -393,13 +402,16 @@ services:
393402
environment:
394403
- PAYMENT_SERVICE_PORT
395404
- FLAGD_HOST
405+
- FLAGD_PORT
396406
- OTEL_EXPORTER_OTLP_ENDPOINT
397407
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
398408
- OTEL_RESOURCE_ATTRIBUTES
399409
- OTEL_SERVICE_NAME=paymentservice
400410
depends_on:
401411
otelcol:
402412
condition: service_started
413+
flagd:
414+
condition: service_started
403415
logging: *logging
404416

405417
# Product Catalog service
@@ -421,13 +433,16 @@ services:
421433
environment:
422434
- PRODUCT_CATALOG_SERVICE_PORT
423435
- FLAGD_HOST
436+
- FLAGD_PORT
424437
- OTEL_EXPORTER_OTLP_ENDPOINT
425438
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
426439
- OTEL_RESOURCE_ATTRIBUTES
427440
- OTEL_SERVICE_NAME=productcatalogservice
428441
depends_on:
429442
otelcol:
430443
condition: service_started
444+
flagd:
445+
condition: service_started
431446
logging: *logging
432447

433448
# Quote service
@@ -478,6 +493,7 @@ services:
478493
- RECOMMENDATION_SERVICE_PORT
479494
- PRODUCT_CATALOG_SERVICE_ADDR
480495
- FLAGD_HOST
496+
- FLAGD_PORT
481497
- OTEL_PYTHON_LOG_CORRELATION=true
482498
- OTEL_EXPORTER_OTLP_ENDPOINT
483499
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
@@ -489,6 +505,8 @@ services:
489505
condition: service_started
490506
otelcol:
491507
condition: service_started
508+
flagd:
509+
condition: service_started
492510
logging: *logging
493511

494512
# Shipping service
@@ -763,6 +781,8 @@ services:
763781
condition: service_started
764782
frauddetectionservice:
765783
condition: service_started
784+
flagd:
785+
condition: service_started
766786

767787
tracetest-server:
768788
image: ${TRACETEST_IMAGE}

0 commit comments

Comments
 (0)