-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.monitor.yml
53 lines (50 loc) · 1.61 KB
/
docker-compose.monitor.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
# Meant to be used in conjunction (after) the main docker-compose.yml:
#
# docker compose -f docker-compose.yml -f docker-compose.prod.yml -f docker-compose.monitor.yml up
services:
flower:
image: mher/flower
hostname: flower
environment:
CELERY_BROKER_URL: "redis://redis:6379"
CELERY_RESULT_BACKEND: "redis://redis:6379"
depends_on:
- celery
ports:
- "5555:5555"
prometheus:
image: prom/prometheus
hostname: prometheus
build:
context: ops
dockerfile: prometheus.Dockerfile
args:
# These hostnames match service names in main docker-compose.yml
TARGET_HOSTS: "['web:8000', 'celery:9080', 'celery-exporter:9808']"
HTTP_BASIC_USERNAME: "ietf"
HTTP_BASIC_PASSWORD: "${API_SECRET:?missing API secret}"
JOB_NAME: "bibxml-service"
depends_on:
- web
- celery
- celery-exporter
ports:
- "9090:9090"
grafana:
image: grafana/grafana-oss
hostname: grafana
environment:
GF_SECURITY_ADMIN_USER: "ietf"
GF_SECURITY_ADMIN_PASSWORD: ${API_SECRET}
SOURCE_NAME: BibXML’s Prometheus
SOURCE: "http://prometheus:9090/"
SOURCE_VERSION: 1
volumes:
- ./ops/grafana-datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
- ./ops/grafana-dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml
- ./ops/grafana-dashboard-gui-usage.json:/etc/dashboards/bibxml/gui_usage.json
- ./ops/grafana-dashboard-api-usage.json:/etc/dashboards/bibxml/api_usage.json
depends_on:
- prometheus
ports:
- "3000:3000"