forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 36
/
docker-compose-tests.yml
130 lines (125 loc) · 3.52 KB
/
docker-compose-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
include:
- path:
- docker-compose.yml # depend on the main docker-compose file
- docker-compose-tests_include-override.yml # include override for tests
services:
# *****
# Tests
# *****
# Frontend Tests
frontendTests:
image: ${IMAGE_NAME}:${DEMO_VERSION}-frontend-tests
container_name: frontend-tests
build:
context: ./
dockerfile: ./src/frontend/Dockerfile.cypress
volumes:
- ./src/frontend/cypress/videos:/app/cypress/videos
- ./src/frontend/cypress/screenshots:/app/cypress/screenshots
environment:
- CYPRESS_baseUrl=http://${FRONTEND_ADDR}
- FRONTEND_ADDR
- NODE_ENV=production
depends_on:
- frontend
# Tracebased Tests
traceBasedTests:
image: ${IMAGE_NAME}:${DEMO_VERSION}-traceBasedTests
container_name: traceBasedTests
build:
context: ./
dockerfile: ./test/tracetesting/Dockerfile
args:
TRACETEST_IMAGE_VERSION: ${TRACETEST_IMAGE_VERSION}
environment:
- AD_SERVICE_ADDR
- CART_SERVICE_ADDR
- CHECKOUT_SERVICE_ADDR
- CURRENCY_SERVICE_ADDR
- EMAIL_SERVICE_ADDR
- FRONTEND_ADDR
- PAYMENT_SERVICE_ADDR
- PRODUCT_CATALOG_SERVICE_ADDR
- RECOMMENDATION_SERVICE_ADDR
- SHIPPING_SERVICE_ADDR
- KAFKA_SERVICE_ADDR
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./test/tracetesting:/app/test/tracetesting
- ./pb:/app/pb
depends_on:
tracetest-server:
condition: service_healthy
# adding demo services as dependencies
accountingservice:
condition: service_started
adservice:
condition: service_started
cartservice:
condition: service_started
checkoutservice:
condition: service_started
currencyservice:
condition: service_started
emailservice:
condition: service_started
frauddetectionservice:
condition: service_started
frontend:
condition: service_started
paymentservice:
condition: service_started
productcatalogservice:
condition: service_started
quoteservice:
condition: service_started
recommendationservice:
condition: service_started
shippingservice:
condition: service_started
flagd:
condition: service_started
kafka:
condition: service_started
tracetest-server:
image: ${TRACETEST_IMAGE}
platform: linux/amd64
container_name: tracetest-server
volumes:
- type: bind
source: ./test/tracetesting/tracetest-config.yaml
target: /app/tracetest.yaml
- type: bind
source: ./test/tracetesting/tracetest-provision.yaml
target: /app/provision.yaml
command: --provisioning-file /app/provision.yaml
ports:
- 11633:11633
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
tracetest-postgres:
condition: service_healthy
otelcol:
condition: service_started
healthcheck:
test: [ "CMD", "wget", "--spider", "localhost:11633" ]
interval: 1s
timeout: 3s
retries: 60
tracetest-postgres:
image: ${POSTGRES_IMAGE}
container_name: tracetest-postgres
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
healthcheck:
test: pg_isready -U "$$POSTGRES_USER" -d "$$POSTGRES_DB"
interval: 1s
timeout: 5s
retries: 60
ports:
- 5432