-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
93 lines (86 loc) · 2.83 KB
/
docker-compose.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
version: '2'
services:
cat-api:
image: ghcr.io/egorklimov/test-assignment/cat-api:0.0.1-SNAPSHOT
container_name: cat-api
ports:
- 8080:8080
depends_on:
- cat-api-postgres
- otel_collector
environment:
PORT: 8080
SPRING_DATASOURCE_URL: jdbc:postgresql://cat-api-postgres:5432/cats
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: postgres
JAVA_TOOL_OPTIONS: "-Xms256M -Xmx10G"
OTEL_METRICS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel_collector:4317
OTEL_RESOURCE_ATTRIBUTES: 'service.name=cat-api'
SPRING_CLOUD_OPENFEIGN_CLIENT_CONFIG_RANDOMCOFFEE_URL: http://cat-recommender-api:8080
APP_NUMBER_OF_CATS_TO_ADD_ON_STARTUP: 1000
cat-api-postgres:
image: postgres:15.2-alpine
container_name: cat-api-postgres
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: cats
ports:
- '5432:5432'
cat-recommender-api:
image: ghcr.io/egorklimov/test-assignment/cat-recommender:0.0.1
container_name: cat-recommender-api
ports:
- 8081:8080
depends_on:
- otel_collector
- cat-api
environment:
OTEL_METRICS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_EXPORTER_OTLP_ENDPOINT: http://otel_collector:4317
OTEL_RESOURCE_ATTRIBUTES: 'service.name=cat-recommender-api'
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
volumes:
- "./conf/jaeger-ui.json:/etc/jaeger/jaeger-ui.json"
command: --query.ui-config /etc/jaeger/jaeger-ui.json
environment:
METRICS_STORAGE_TYPE: prometheus
PROMETHEUS_SERVER_URL: http://prometheus:9090
PROMETHEUS_QUERY_SUPPORT_SPANMETRICS_CONNECTOR: true
PROMETHEUS_QUERY_NAMESPACE: ${PROMETHEUS_QUERY_NAMESPACE:-}
PROMETHEUS_QUERY_DURATION_UNIT: ${PROMETHEUS_QUERY_DURATION_UNIT:-}
ports:
- "16686:16686"
otel_collector:
image: otel/opentelemetry-collector-contrib:0.88.0
volumes:
- ./conf/otel-collector-config-connector.yml:/etc/otelcol/otel-collector-config.yml
command: --config /etc/otelcol/otel-collector-config.yml
depends_on:
- jaeger
prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- "./conf/prometheus.yml:/etc/prometheus/prometheus.yml"
ports:
- "9090:9090"
grafana:
image: grafana/grafana:latest
container_name: grafana
volumes:
- ./conf/grafana.ini:/etc/grafana/grafana.ini
- ./conf/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yaml
environment:
GF_AUTH_ANONYMOUS_ENABLED: true
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
GF_AUTH_DISABLE_LOGIN_FORM: true
ports:
- 3000:3000