-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcompose.yaml
140 lines (127 loc) · 3.31 KB
/
compose.yaml
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
131
132
133
134
135
136
137
138
139
140
version: '3.4'
# This is a docker-compose file for running the demo locally.
# You must make sure you have following environment variables set:
# - PROMETHEUS_URL
# - PROMETHEUS_USERNAME
# - PROMETHEUS_API_KEY
# - TEMPO_URL
# - TEMPO_USERNAME
# - TEMPO_API_KEY
#
# Then run:
# docker-compose up
# or:
# podman-compose up
services:
cart:
build:
context: src/src
dockerfile: services/cart/Dockerfile
environment:
- SERVICE_NAME=cart
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
# Redis
cart-data:
build:
context: src/src
dockerfile: services/cart-data/Dockerfile
product:
build:
context: src/src
dockerfile: services/product/Dockerfile
environment:
- SERVICE_NAME=product
- SERVICE_HOST_PRODUCT_DATA=product-data
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
depends_on:
- product-data
# PostgreSQL
product-data:
build:
context: src/src/services/product-data
dockerfile: Dockerfile
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
content:
build:
context: src/src
dockerfile: services/content/Dockerfile
environment:
- SERVICE_NAME=content
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
checkout:
build:
context: src/src
dockerfile: services/checkout/Dockerfile
environment:
- SERVICE_NAME=checkout
- SERVICE_HOST_API_GATEWAY=api-gateway
- SERVICE_PORT_API_GATEWAY=8080
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
payment:
build:
context: src/src
dockerfile: services/payment/Dockerfile
environment:
- SERVICE_NAME=payment
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
api-gateway:
build:
context: src/src
dockerfile: services/api-gateway/Dockerfile
depends_on:
- cart
- cart-data
- product
- product-data
- content
- checkout
environment:
- SERVICE_NAME=api-gateway
- SERVICE_BIND_PORT=8080
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
web-gateway:
build:
context: src/src
dockerfile: services/web-gateway/Dockerfile
ports:
- "8080:8080"
depends_on:
- api-gateway
environment:
- SERVICE_NAME=web-gateway
- SERVICE_BIND_PORT=8080
- PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
- SERVICE_HOST_API_GATEWAY=api-gateway
- SERVICE_PORT_API_GATEWAY=8080
- SERVICE_HOST_SESSION_DATA=session-data
- OTLP_RECEIVER_HOST=agent
- OTLP_RECEIVER_PORT=4317
# Another Redis
session-data:
build:
context: src/src
dockerfile: services/session-data/Dockerfile
agent:
image: docker.io/grafana/agent:v0.24.2
volumes:
- ./agent-config-local.yaml:/etc/agent-config.yaml:z
command:
- "-config.file=/etc/agent-config.yaml"
- "-config.expand-env"
environment:
- PROMETHEUS_URL=${PROMETHEUS_URL}
- PROMETHEUS_USERNAME=${PROMETHEUS_USERNAME}
- PROMETHEUS_API_KEY=${PROMETHEUS_API_KEY}
- TEMPO_URL=${TEMPO_URL}
- TEMPO_USERNAME=${TEMPO_USERNAME}
- TEMPO_API_KEY=${TEMPO_API_KEY}