forked from Altinity/clickhouse-grafana
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
118 lines (109 loc) · 4.82 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
version: "3"
services:
clickhouse-ontime:
image: yandex/clickhouse-server:latest
volumes:
- ./docker/clickhouse/load_ontime.sh:/docker-entrypoint-initdb.d/load_ontime.sh
- /var/lib/clickhouse/
- /var/log/clickhouse-server/
clickhouse:
image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-latest}
ports:
- 8123:8123
- 9000:9000
- 5432:5432
- 3306:3306
volumes:
- /var/log/clickhouse-server
- ./docker/clickhouse/init_schema.sql:/docker-entrypoint-initdb.d/init_schema.sql
- ./docker/clickhouse/postgres_dictionary.xml:/etc/clickhouse-server/postgres_dictionary.xml
- ./docker/clickhouse/listen_ports.xml:/etc/clickhouse-server/config.d/listen_ports.xml
- ./docker/clickhouse/ca-key.pem:/etc/clickhouse-server/ca-key.pem
- ./docker/clickhouse/ca-cert.pem:/etc/clickhouse-server/ca-cert.pem
- ./docker/clickhouse/server-cert.pem:/etc/clickhouse-server/server-cert.pem
- ./docker/clickhouse/server-key.pem:/etc/clickhouse-server/server-key.pem
- ./docker/clickhouse/client-cert.pem:/etc/clickhouse-server/client-cert.pem
- ./docker/clickhouse/client-key.pem:/etc/clickhouse-server/client-key.pem
- ./docker/clickhouse/dhparam.pem:/etc/clickhouse-server/dhparam.pem
postgres:
image: postgres:latest
environment:
- POSTGRES_PASSWORD=grafana
volumes:
- ./docker/postgres/init_schema.sql:/docker-entrypoint-initdb.d/init_schema.sql
grafana:
image: grafana/grafana:${GRAFANA_VERSION:-latest}
volumes:
- ./:/var/lib/grafana/plugins/vertamedia-clickhouse/
- ./docker/grafana/grafana-clickhouse-datasource.yaml:/etc/grafana/provisioning/datasources/grafana-clickhouse-datasource.yaml
- ./docker/grafana/grafana-clickhouse-datasource-get.yaml:/etc/grafana/provisioning/datasources/grafana-clickhouse-datasource-get.yaml
- ./docker/grafana/grafana-clickhouse-datasource-x-auth.yaml:/etc/grafana/provisioning/datasources/grafana-clickhouse-datasource-x-auth.yaml
- ./docker/grafana/grafana-clickhouse-ontime-datasource.yaml:/etc/grafana/provisioning/datasources/grafana-clickhouse-ontime-datasource.yaml
- ./docker/grafana/grafana-postgres-datasource.yaml:/etc/grafana/provisioning/datasources/grafana-postgres-datasource.yaml
- ./docker/grafana/grafana-trickster-datasource.yaml:/etc/grafana/provisioning/datasources/grafana-trickster-datasource.yaml
- ./docker/grafana/grafana-dashboards.yaml:/etc/grafana/provisioning/dashboards/grafana-dashboards.yaml
- ./docker/grafana/dashboards/:/var/lib/grafana/dashboards/
environment:
- GF_INSTALL_PLUGINS=grafana-piechart-panel,grafana-worldmap-panel
- GF_LOG_LEVEL=debug
- GF_UNIFIED_ALERTING_ENABLED=true
- GF_ALERTING_ENABLED=false
ports:
- 3000:3000
depends_on:
- clickhouse
trickster:
image: tricksterio/trickster:${TRICKSTER_VERSION:-latest}
volumes:
- ./docker/trickster/trickster.conf:/etc/trickster/trickster.conf
ports:
- 8480:8480
depends_on:
- clickhouse
frontend_builder:
image: node:lts
working_dir: /grafana-clickhouse
volumes:
- ./:/grafana-clickhouse
# for speedup npm install
- "node_modules:/grafana-clickhouse/node_modules"
command: |
bash -xec '
if [[ "3" == `ls -la ./node_modules/ | wc -l` ]]; then npm install --production=false; fi && \
npm run build:prod && \
npm run test:docker
'
backend_builder:
image: golang:1.17
working_dir: /go/src/grafana-clickhouse
environment:
GOCACHE: "/go-cache"
RUN_TESTS: "${RUN_TESTS:-.+}"
volumes:
- ./:/go/src/grafana-clickhouse
- ./.cache:/go/pkg/mod
- ./.cache:/go-cache
command: |
bash -xec "
go test -timeout 1m -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v ./pkg/ &&
GOOS=linux GOARCH=amd64 go build -o ./dist/vertamedia-clickhouse-plugin_linux_amd64 ./pkg/ && \
GOOS=linux GOARCH=arm64 go build -o ./dist/vertamedia-clickhouse-plugin_linux_arm64 ./pkg/ && \
GOOS=windows GOARCH=amd64 go build -o ./dist/vertamedia-clickhouse-plugin_windows_amd64.exe ./pkg/ && \
GOOS=darwin GOARCH=amd64 go build -o ./dist/vertamedia-clickhouse-plugin_darwin_amd64 ./pkg/ && \
GOOS=darwin GOARCH=arm64 go build -o ./dist/vertamedia-clickhouse-plugin_darwin_arm64 ./pkg/ && \
chmod +x ./dist/vertamedia-clickhouse-plugin*
"
plugin_signer:
image: node:lts
working_dir: /grafana-clickhouse
volumes:
- ./:/grafana-clickhouse
# for speedup npm install
- "node_modules:/grafana-clickhouse/node_modules"
command: |
bash -xec "
if [[ ! -f ./node_modules/@grafana/toolkit/bin/grafana-toolkit.js ]]; then npm install --production=false; fi && \
npm run sign
"
volumes:
node_modules: