-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
167 lines (156 loc) · 5.03 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
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
version: "3.7"
volumes:
grafana_data:
tempo_data:
networks:
default:
name: aos
driver: bridge
services:
traefik:
image: "traefik:v2.10"
container_name: "traefik"
command:
#- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:8090"
ports:
- "8090:8090"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
aos:
container_name: aos
image: ghcr.io/brittonhayes/aos:latest
build:
context: .
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.aos-api.rule=Host(`aos-api.localhost`) && PathPrefix(`/api`) && Method(`GET`, `OPTIONS`)"
- "traefik.http.routers.aos-api.entrypoints=web"
- "traefik.http.middlewares.aos-api-ratelimit.ratelimit.average=250"
- "traefik.http.middlewares.aos-api-ratelimit.ratelimit.burst=100"
- "traefik.http.middlewares.aos-api-strip-api.stripprefix.prefixes=/api"
- "traefik.http.routers.aos-api.middlewares=aos-api-strip-api"
- "traefik.http.services.aos-api.loadbalancer.server.port=8080"
environment:
- SERVICE_NAME
- SERVICE_PORT
- OTEL_EXPORTER_OTLP_ENDPOINT
- OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- OTEL_RESOURCE_ATTRIBUTES
command: ["--migrate"]
logging:
driver: fluentd
options:
fluentd-address: localhost:24224
depends_on:
otel:
condition: service_started
otel:
image: otel/opentelemetry-collector-contrib:0.76.1
container_name: otel
labels:
- "traefik.enable=true"
- "traefik.http.routers.otel.rule=Host(`otel.localhost`)"
- "traefik.http.routers.otel.entrypoints=web"
- "traefik.docker.network=web"
- "traefik.http.services.otel.loadbalancer.server.port=4318"
deploy:
resources:
limits:
memory: 125M
restart: unless-stopped
command: [ "--config=/etc/otel-config.yaml"]
volumes:
- ./config/otel-config.yaml:/etc/otel-config.yaml
ports:
- "4317" # OTLP over gRPC receiver
- "4318" # OTLP over HTTP receiver
- "9464" # Prometheus exporter
- "8888" # metrics endpoint
- "3500" # Loki over HTTP receiver
depends_on:
- tempo
tempo:
image: grafana/tempo:latest
container_name: tempo
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./config/tempo.yaml:/etc/tempo.yaml
- tempo_data:/tmp/tempo
ports:
- "14268" # jaeger ingest
- "3200" # tempo
- "4317" # otlp grpc
- "4318" # otlp http
prometheus:
image: quay.io/prometheus/prometheus:v2.43.0
container_name: prometheus
labels:
- "traefik.enable=true"
- "traefik.http.routers.prometheus.rule=Host(`prometheus.localhost`)"
- "traefik.http.routers.prometheus.entrypoints=web"
- "traefik.docker.network=web"
- "traefik.http.services.prometheus.loadbalancer.server.port=${PROMETHEUS_SERVICE_PORT}"
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --config.file=/etc/prometheus/prometheus-config.yaml
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
- --enable-feature=exemplar-storage
volumes:
- ./config/prometheus-config.yaml:/etc/prometheus/prometheus-config.yaml
deploy:
resources:
limits:
memory: 300M
ports:
- "${PROMETHEUS_SERVICE_PORT}"
grafana:
image: grafana/grafana-enterprise
container_name: grafana
labels:
- "traefik.enable=true"
- "traefik.http.routers.grafana.rule=Host(`grafana.localhost`)"
- "traefik.http.routers.grafana.entrypoints=web"
- "traefik.docker.network=web"
- "traefik.http.services.grafana.loadbalancer.server.port=${GRAFANA_SERVICE_PORT}"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_FEATURE_TOGGLES_ENABLE=traceqlEditor
restart: unless-stopped
ports:
- "3000"
volumes:
- grafana_data:/var/lib/grafana
- ./config/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/grafana-datasources.yaml
loki:
image: grafana/loki:latest
container_name: loki
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml
promtail:
image: grafana/promtail:latest
container_name: promtail
volumes:
- ./config/promtail-config.yaml:/etc/promtail/config.yaml:ro
- /var/run/docker.sock:/var/run/docker.sock
command: -config.file=/etc/promtail/config.yaml
fluentbit:
image: fluent/fluent-bit
container_name: fluentbit
volumes:
- ./config/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf
ports:
- "24224:24224"
- "24224:24224/udp"