-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdocker-compose.yaml
148 lines (142 loc) · 6.32 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
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
version: '3.0'
services:
grafana_plain:
# image: grafana/grafana:latest
container_name: 'mahendrapaipuri-dashboardreporter-app-plain'
build:
context: ../.config
args:
grafana_image: ${GRAFANA_IMAGE:-grafana-oss}
grafana_version: ${GRAFANA_VERSION:-11.4.0}
ports:
- 3080:${GF_SERVER_HTTP_PORT:-3000}/tcp
volumes:
- ../dist:/var/lib/grafana/plugins/mahendrapaipuri-dashboardreporter-app
- ./dashboards:/etc/grafana/provisioning/dashboards
- ./datasources:/etc/grafana/provisioning/datasources
# Dont set config in provisioning just to ensure that plugin works without any
# extra config
- ./config/plain:/etc/grafana/provisioning/plugins
- ./runtime/plain:/srv
environment:
# basic settings
# output to terminal
- TERM=linux
- GF_DEFAULT_APP_MODE=development
- GF_SERVER_HTTP_PORT=${GF_SERVER_HTTP_PORT:-3000}
- GF_LOG_LEVEL=${GF_LOG_LEVEL:-info}
- GF_DATABASE_PATH=${GF_DATABASE_PATH:-/srv/grafana.db}
- GF_DATAPROXY_LOGGING=true
- GF_APP_URL=http://localhost:3000
# allow anonymous admin so we don't have to set up a password to start testing
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_AUTH_BASIC_ENABLED=true
# - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
# skip login page
# - GF_AUTH_DISABLE_LOGIN_FORM=true
# We need to toggle external service accounts so that Grafana will get
# the token from a service account to read dashboards
- GF_FEATURE_TOGGLES_ENABLE=${GF_FEATURE_TOGGLES_ENABLE:-accessControlOnCall,idForwarding,externalServiceAccounts}
- GF_AUTH_MANAGED_SERVICE_ACCOUNTS_ENABLED=true
# disable alerting because it vomits logs
- GF_ALERTING_ENABLED=false
- GF_UNIFIED_ALERTING_ENABLED=false
- GF_LIVE_MAX_CONNECTIONS=0
- GF_PLUGINS_DISABLE_PLUGINS=grafana-lokiexplore-app
# Grafana image renderer
- GF_RENDERING_SERVER_URL=http://renderer_plain:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana_plain:${GF_SERVER_HTTP_PORT:-3000}/
- GF_RENDERER_PLUGIN_IGNORE_HTTPS_ERRORS=true
- "GF_LOG_FILTERS=rendering:debug plugin.mahendrapaipuri-dashboardreporter-app:debug"
# Set CI mode to remove header in report
- __REPORTER_APP_CI_MODE=true
- GF_REPORTER_PLUGIN_REMOTE_CHROME_URL=${GF_REPORTER_PLUGIN_REMOTE_CHROME_URL:-}
- GF_REPORTER_PLUGIN_NATIVE_RENDERER=${GF_REPORTER_PLUGIN_NATIVE_RENDERER:-false}
renderer_plain:
image: grafana/grafana-image-renderer:latest
environment:
# Recommendation of grafana-image-renderer for optimal performance
# https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/#configuration
- RENDERING_MODE=clustered
- RENDERING_CLUSTERING_MODE=browser
- RENDERING_CLUSTERING_MAX_CONCURRENCY=5
- RENDERING_CLUSTERING_TIMEOUT=60
- IGNORE_HTTPS_ERRORS=true
chrome_plain:
image: chromedp/headless-shell:latest
shm_size: 2G
init: true
network_mode: service:grafana_plain
grafana_tls:
# image: grafana/grafana:latest
container_name: 'mahendrapaipuri-dashboardreporter-app-tls'
build:
context: ../.config
args:
grafana_image: ${GRAFANA_IMAGE:-grafana-oss}
grafana_version: ${GRAFANA_VERSION:-11.4.0}
ports:
- 3443:${GF_SERVER_HTTP_PORT:-3000}/tcp
volumes:
- ../dist:/var/lib/grafana/plugins/mahendrapaipuri-dashboardreporter-app
- ./dashboards:/etc/grafana/provisioning/dashboards
- ./datasources:/etc/grafana/provisioning/datasources
- ./config/tls:/etc/grafana/provisioning/plugins
- ./certs:/etc/grafana/tls
- ./runtime/tls:/srv
environment:
# basic settings
# output to terminal
- TERM=linux
- GF_DEFAULT_APP_MODE=development
- GF_SERVER_HTTP_PORT=${GF_SERVER_HTTP_PORT:-3000}
- GF_LOG_LEVEL=${GF_LOG_LEVEL:-info}
- GF_DATAPROXY_LOGGING=true
- GF_DATABASE_PATH=${GF_DATABASE_PATH:-/srv/grafana.db}
# allow anonymous admin so we don't have to set up a password to start testing
- GF_AUTH_ANONYMOUS_ENABLED=false
- GF_AUTH_BASIC_ENABLED=true
#- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
# skip login page
# - GF_AUTH_DISABLE_LOGIN_FORM=true
# We need to toggle external service accounts so that Grafana will get
# the token from a service account to read dashboards
- GF_FEATURE_TOGGLES_ENABLE=${GF_FEATURE_TOGGLES_ENABLE:-accessControlOnCall,idForwarding,externalServiceAccounts}
- GF_AUTH_MANAGED_SERVICE_ACCOUNTS_ENABLED=true
# disable alerting because it vomits logs
- GF_ALERTING_ENABLED=false
- GF_UNIFIED_ALERTING_ENABLED=false
- GF_LIVE_MAX_CONNECTIONS=0
- GF_PLUGINS_DISABLE_PLUGINS=grafana-lokiexplore-app
# TLS
- GF_SERVER_PROTOCOL=https
- GF_SERVER_CERT_KEY=/etc/grafana/tls/localhost.key
- GF_SERVER_CERT_FILE=/etc/grafana/tls/localhost.crt
# Grafana image renderer
- GF_RENDERING_SERVER_URL=http://renderer_tls:8081/render
- GF_RENDERING_CALLBACK_URL=https://grafana_tls:${GF_SERVER_HTTP_PORT:-3000}/
- GF_RENDERER_PLUGIN_IGNORE_HTTPS_ERRORS=true
- GF_LOG_FILTERS=rendering:debug
# Set CI mode to remove header in report
- __REPORTER_APP_CI_MODE=true
- GF_REPORTER_PLUGIN_REMOTE_CHROME_URL=${GF_REPORTER_PLUGIN_REMOTE_CHROME_URL:-}
- GF_REPORTER_PLUGIN_NATIVE_RENDERER=${GF_REPORTER_PLUGIN_NATIVE_RENDERER:-false}
- GF_REPORTER_PLUGIN_SKIP_TLS_CHECK=true
renderer_tls:
image: grafana/grafana-image-renderer:latest
environment:
# Recommendation of grafana-image-renderer for optimal performance
# https://grafana.com/docs/grafana/latest/setup-grafana/image-rendering/#configuration
- RENDERING_MODE=clustered
- RENDERING_CLUSTERING_MODE=browser
- RENDERING_CLUSTERING_MAX_CONCURRENCY=5
- RENDERING_CLUSTERING_TIMEOUT=60
- IGNORE_HTTPS_ERRORS=true
chrome_tls:
image: chromedp/headless-shell:latest
shm_size: 2G
init: true
network_mode: service:grafana_tls
# We need to manually setup chrome instance as default entrypoint does not have --ignore-certificate-errors flag
entrypoint: /headless-shell/headless-shell
command: --remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --disable-gpu --headless --no-sandbox --ignore-certificate-errors=1