forked from blueswen/fastapi-observability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
88 lines (80 loc) · 2.08 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
78
79
80
81
82
83
84
85
86
87
88
x-logging: &default-logging
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
loki-pipeline-stages: |
- multiline:
firstline: '^\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2}'
max_wait_time: 3s
- regex:
expression: '^(?P<time>\d{4}-\d{2}-\d{2} \d{1,2}:\d{2}:\d{2},d{3}) (?P<message>(?s:.*))$$'
version: "3.4"
services:
loki:
image: grafana/loki:3.0.0
command: -config.file=/etc/loki/local-config.yaml
ports:
- "3100:3100"
app-a:
# build: ./fastapi_app/
image: ghcr.io/blueswen/fastapi-observability/app:latest
ports:
- "8000:8000"
depends_on:
- loki
environment:
APP_NAME: "app-a"
logging: *default-logging
app-b:
# build: ./fastapi_app/
image: ghcr.io/blueswen/fastapi-observability/app:latest
ports:
- "8001:8000"
depends_on:
- loki
environment:
APP_NAME: "app-b"
logging: *default-logging
app-c:
# build: ./fastapi_app/
image: ghcr.io/blueswen/fastapi-observability/app:latest
ports:
- "8002:8000"
depends_on:
- loki
environment:
APP_NAME: "app-c"
logging: *default-logging
prometheus:
image: prom/prometheus:v2.51.2
ports:
- "9090:9090"
volumes:
- ./etc/prometheus:/workspace
command:
- --config.file=/workspace/prometheus.yml
- --enable-feature=exemplar-storage
depends_on:
- loki
logging: *default-logging
tempo:
image: grafana/tempo:2.4.1
command: [ "--target=all", "--storage.trace.backend=local", "--storage.trace.local.path=/var/tempo", "--auth.enabled=false" ]
ports:
- "4317:4317"
- "4318:4318"
depends_on:
- loki
logging: *default-logging
grafana:
image: grafana/grafana:10.4.2
ports:
- "3000:3000"
volumes:
- ./etc/grafana/:/etc/grafana/provisioning/datasources
- ./etc/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml
- ./etc/dashboards:/etc/grafana/dashboards
depends_on:
- loki
- prometheus
logging: *default-logging