This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
110 lines (103 loc) · 3.16 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# https://grafana.com/docs/loki/latest/clients/docker-driver/
# docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
version: '3'
services:
db:
environment:
POSTGRES_USER: postgres
POSTGRES_DB: fantasy_nerd
POSTGRES_PASSWORD: postgres
image: postgres:14-alpine
depends_on:
- loki
ports:
- "15432:5432"
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
app:
restart: on-failure
depends_on:
- db
- loki
build: .
# image: axum-rest-example:latest
init: true
environment:
APP__DATABASE__URL: "postgres://postgres:postgres@db/axum_rest_example"
APP_ENV: production
RUST_LOG: axum_rest_example=debug,tower_http=debug,info
ports:
- "8080:8080"
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
volumes:
- ./shared/production.toml:/app/config/production.toml:ro
grafana:
# https://hub.docker.com/r/grafana/grafana/tags?page=1&ordering=last_updated
# https://github.com/grafana/grafana/releases/latest
image: grafana/grafana:9.0.7
depends_on:
- loki
volumes:
- ./shared/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:ro
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
loki:
# https://hub.docker.com/r/grafana/loki/tags?page=1&ordering=last_updated
# https://github.com/grafana/loki/releases/latest
image: grafana/loki:2.6.1
command: [ "-config.file=/etc/loki/local-config.yaml" ]
ports:
- "3100:3100" # loki needs to be exposed so it receives logs
environment:
- JAEGER_AGENT_HOST=tempo
- JAEGER_ENDPOINT=http://tempo:14268/api/traces # send traces to Tempo
- JAEGER_SAMPLER_TYPE=const
- JAEGER_SAMPLER_PARAM=1
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
prometheus:
# https://hub.docker.com/r/prom/prometheus/tags?page=1&ordering=last_updated
# https://github.com/prometheus/prometheus/releases/latest
image: prom/prometheus:v2.37.0
command: [ "--config.file=/etc/prometheus.yaml" ]
depends_on:
- loki
volumes:
- ./shared/prometheus.yaml:/etc/prometheus.yaml:ro
ports:
- "9090:9090"
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'
tempo:
# https://hub.docker.com/r/grafana/tempo/tags?page=1&ordering=last_updated
# https://github.com/grafana/tempo/releases/latest
image: grafana/tempo:1.4.1
depends_on:
- loki
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./shared/tempo.yaml:/etc/tempo.yaml:ro
- ./tempo-data:/tmp/tempo
ports:
- "14268:14268" # jaeger ingest
logging:
driver: loki
options:
loki-url: 'http://localhost:3100/api/prom/push'