-
Notifications
You must be signed in to change notification settings - Fork 229
/
docker-compose.yml
67 lines (67 loc) · 1.84 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
version: '3'
services:
mysql:
ports:
- 3306:3306
image: mysql:8.3
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-root}
- MYSQL_DATABASE=${MYSQL_DATABASE:-grafana}
- MYSQL_USER=${MYSQL_USER:-grafana}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-grafana}
healthcheck:
test: mysqladmin ping -h localhost
interval: 10s
retries: 10
start_period: 10s
grafana:
depends_on:
mysql:
condition: service_healthy
ports:
- 3000:3000
image: ${GRAFANA_IMAGE:-grafana/grafana}:${GRAFANA_VERSION}
environment:
- GF_DATABASE_TYPE=mysql
- GF_DATABASE_HOST=mysql
- GF_DATABASE_NAME=${MYSQL_DATABASE:-grafana}
- GF_DATABASE_USER=${MYSQL_USER:-grafana}
- GF_DATABASE_PASSWORD=${MYSQL_PASSWORD:-grafana}
- GF_SERVER_ROOT_URL=${GRAFANA_URL}
- GF_ENTERPRISE_LICENSE_TEXT=${GF_ENTERPRISE_LICENSE_TEXT:-}
- GF_SERVER_SERVE_FROM_SUB_PATH=${GF_SERVER_SERVE_FROM_SUB_PATH:-}
- GF_FEATURE_TOGGLES_ENABLE=nestedFolders
healthcheck:
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:3000/api/health || exit 1 # Use wget because older versions of Grafana don't have curl
interval: 10s
retries: 10
start_period: 10s
mtls-proxy:
profiles:
- "tls"
depends_on:
- grafana
image: squareup/ghostunnel:v1.5.2
command: |
server
--listen 0.0.0.0:3001
--target grafana:3000
--unsafe-target
--key /certs/grafana.key
--cert /certs/grafana.crt
--cacert /certs/ca.crt
--allow-cn client
volumes:
- ./testdata:/certs
ports:
- 3001:3001
nginx:
profiles:
- "proxy"
depends_on:
- grafana
image: nginx:latest
ports:
- 3001:3001
volumes:
- ./testdata/nginx.conf:/etc/nginx/nginx.conf