-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
191 lines (178 loc) · 4.86 KB
/
docker-compose.yml
File metadata and controls
191 lines (178 loc) · 4.86 KB
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
version: "3.9"
services:
postgres:
image: postgres:15-alpine
container_name: gi-postgres
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
POSTGRES_DB: game_insight
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user"]
interval: 10s
timeout: 5s
retries: 5
volumes:
- pgdata:/var/lib/postgresql/data
zookeeper:
image: bitnami/zookeeper:3.9
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
ports:
- "2181:2181"
kafka:
image: bitnami/kafka:3.7
depends_on:
- zookeeper
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092
ports:
- "9092:9092"
rabbitmq:
image: rabbitmq:3.13-management-alpine
ports:
- "5672:5672"
- "15672:15672"
otel-collector:
image: otel/opentelemetry-collector-contrib:0.98.0
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
- ./observability/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
ports:
- "4317:4317"
- "4318:4318"
gateway:
build: ./services/gateway
environment:
- PORT=8080
- LOG_LEVEL=info
- KAFKA_BROKERS=kafka:9092
- RABBITMQ_URL=amqp://guest:guest@rabbitmq:5672/
- DATABASE_URL=postgres://user:pass@postgres:5432/game_insight?sslmode=disable
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- postgres
- kafka
- rabbitmq
ports:
- "8080:8080"
user-service:
build: ./services/user-service
environment:
- SPRING_PROFILES_ACTIVE=dev
- DB_URL=jdbc:postgresql://postgres:5432/game_insight
- DB_USER=user
- DB_PASSWORD=pass
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- postgres
ports:
- "8081:8080"
game-service:
build: ./services/game-service
environment:
- SPRING_PROFILES_ACTIVE=dev
- DB_URL=jdbc:postgresql://postgres:5432/game_insight
- DB_USER=user
- DB_PASSWORD=pass
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- postgres
ports:
- "8082:8080"
reco-service:
build: ./services/reco-service
environment:
- PORT=8000
- DATABASE_URL=postgres://user:pass@postgres:5432/game_insight?sslmode=disable
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- postgres
ports:
- "8000:8000"
games-data-etl:
build: ./services/games-data-etl
environment:
- DB_HOST=postgres
- DB_PORT=5432
- DB_USER=user
- DB_PASSWORD=pass
- DB_NAME=game_insight
- DB_SSLMODE=disable
- DB_TIMEZONE=UTC
- IGDB_CLIENT_ID=${IGDB_CLIENT_ID:-replace_me}
- IGDB_SECRET=${IGDB_CLIENT_SECRET:-replace_me}
- BATCH_LIMIT=${IGDB_BATCH_SIZE:-100}
- LOG_LEVEL=info
- LOG_FORMAT=console
- LOKI_URL=http://loki:3100
- LOKI_LABELS=service=games-data-etl,env=dev
- METRICS_PORT=9108
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
depends_on:
- postgres
- loki
- prometheus
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:9108/metrics"]
interval: 30s
timeout: 5s
retries: 5
restart: unless-stopped
ports:
- "9108:9108"
loki:
image: grafana/loki:2.9.3
command: ["-config.file=/etc/loki/local-config.yaml"]
ports:
- "3100:3100"
volumes:
- ./observability/loki-config.yml:/etc/loki/local-config.yaml:ro
- loki-data:/loki
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3100/ready"]
interval: 30s
timeout: 5s
retries: 5
prometheus:
image: prom/prometheus:v2.53.0
volumes:
- ./observability/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus-data:/prometheus
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
ports:
- "9090:9090"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:9090/-/ready"]
interval: 30s
timeout: 5s
retries: 5
grafana:
image: grafana/grafana:10.4.5
depends_on:
- prometheus
- loki
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
ports:
- "3000:3000"
volumes:
- grafana-data:/var/lib/grafana
- ./observability/grafana/datasources:/etc/grafana/provisioning/datasources:ro
- ./observability/grafana/dashboards:/etc/grafana/provisioning/dashboards:ro
volumes:
pgdata:
loki-data:
prometheus-data:
grafana-data: