-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.site.yml
More file actions
93 lines (91 loc) · 2.65 KB
/
docker-compose.site.yml
File metadata and controls
93 lines (91 loc) · 2.65 KB
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
# contains configuation for a production setup a at site with access to an
# openstack instance
---
version: "3.5"
x-logging:
&default-logging
driver: "json-file"
options:
max-size: "100m"
max-file: "5"
services:
site_exporter:
image: "denbicloud/os_project_usage_exporter:2.4.0"
container_name: project_usage_exporter
networks:
- usage_exporter
logging:
*default-logging
environment:
- USAGE_EXPORTER_START_DATE
- USAGE_EXPORTER_UPDATE_INTERVAL
- USAGE_EXPORTER_PROJECT_DOMAINS
- USAGE_EXPORTER_PROJECT_ID
- USAGE_EXPORTER_SIMPLE_VM_PROJECT_ID
- USAGE_EXORTER_SIMPLE_VM_PROJECT_TAG
- USAGE_EXPORTER_WEIGHTS_UPDATE_ENDPOINT
- USAGE_EXPORTER_WEIGHT_UPDATE_FREQUENCY
- USAGE_EXPORTER_START_DATE_ENDPOINT
- USAGE_EXPORTER_VERBOSE_MODE
expose:
- "8080"
ports:
- "${EXPORTER_PORT}:8080"
# prometheus instance responsible for monitoring
site_prometheus:
image: "prom/prometheus:v2.44.0"
# use self build Dockerfile as alternative
# build: prod/site_prometheus
container_name: project_usage_prometheus
logging:
*default-logging
networks:
usage_exporter:
aliases:
- prometheus
expose:
- "9090"
site_prometheus_proxy:
# use the one below to have haproxy debug log directly to stdout including
# every request with auth headers
# image: mminks/haproxy-docker-logging:latest
image: "haproxy:2.8.0-alpine"
# use self build Dockerfile as alternative
# build: prod/haproxy
container_name: project_usage_proxy
logging:
*default-logging
networks:
- usage_exporter
expose:
# this port must be reachable by the portal prometheus instance
# also setup some encryption to or in front of it, otherwise the whole
# authentication stuff is useless
- "80"
ports:
- "${PROXY_PORT}:80"
volumes:
- "./prod/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro"
environment:
- PORTAL_AUTH_TOKEN
site_grafana:
image: "grafana/grafana:9.5.2"
# use self build Dockerfile as alternative
# build: prod/grafana
container_name: project_usage_grafana
logging:
*default-logging
depends_on:
- site_prometheus
networks:
- usage_exporter
volumes:
- "./shared/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/dashboards.yml:ro"
- "./shared/grafana/project_usages.json:/etc/grafana/provisioning/dashboards/project_usages.json:ro"
environment:
- GF_SECURITY_ADMIN_USER
- GF_SECURITY_ADMIN_PASSWORD
expose:
- "3000"
networks:
usage_exporter: