-
Notifications
You must be signed in to change notification settings - Fork 68
/
docker-compose.yaml
77 lines (72 loc) · 2.01 KB
/
docker-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
services:
openmeter:
image: ghcr.io/openmeterio/openmeter:latest
command: openmeter --address 0.0.0.0:8888 --config /etc/openmeter/config.yaml
restart: always
pull_policy: always
depends_on:
kafka:
condition: service_healthy
clickhouse:
condition: service_healthy
postgres:
condition: service_healthy
ports:
- "127.0.0.1:8888:8888"
volumes:
- ./config.yaml:/etc/openmeter/config.yaml
healthcheck:
test: ["CMD", "wget", "--spider", "http://openmeter:8888/api/v1/meters/api_requests_total/query"]
interval: 5s
timeout: 3s
retries: 30
sink-worker:
image: ghcr.io/openmeterio/openmeter:latest
command: openmeter-sink-worker --config /etc/openmeter/config.yaml
restart: always
pull_policy: always
depends_on:
kafka:
condition: service_healthy
clickhouse:
condition: service_healthy
openmeter:
condition: service_healthy
redis:
condition: service_healthy
ports:
- "127.0.0.1:10000:10000"
volumes:
- ./config.yaml:/etc/openmeter/config.yaml
kafka:
extends:
file: ../docker-compose.yaml
service: kafka
clickhouse:
extends:
file: ../docker-compose.yaml
service: clickhouse
redis:
image: redis:7.0-alpine
ports:
- "127.0.0.1:6379:6379"
command: ["redis-server", "--maxmemory", "50mb", "--maxmemory-policy", "noeviction", "--maxmemory-samples", "10"]
healthcheck:
test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
interval: 5s
timeout: 3s
retries: 30
postgres:
image: postgres:14.9-alpine
ports:
- "127.0.0.1:5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=postgres
command: ["postgres", "-c", "wal_level=logical"]
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "$${POSTGRES_DB}", "-U", "$${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 30