├── Dockerfile
├── README.md
├── docker-compose.yml
└── entrypoint.sh
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM grafana/grafana:latest
2 | COPY ./entrypoint.sh /entrypoint.sh
3 | RUN chmod +x ./entrypoint.sh
4 | ENTRYPOINT ["/entrypoint.sh"]
5 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # :mag_right: ClickHouse-Grafana
2 |
3 | []( https://g.codefresh.io/repositories/lmangani/docker-clickhouse-grafana/builds?filter=trigger:build;branch:master;service:59fdf001a13744000180f5f7~docker-clickhouse-grafana)
4 |
5 | Custom Docker container + compose providing:
6 | * [Clickhouse](https://github.com/yandex/ClickHouse/) Database _(latest)_
7 | * [Grafana](https://github.com/grafana/grafana) w/ autoprovisioned [Clickhouse Datasource](https://github.com/Vertamedia/clickhouse-grafana) _(latest)_
8 |
9 | 
10 |
11 | #### Chart Example
12 | 
13 |
14 | #### Table Example
15 | 
16 |
17 | #### Pie Example
18 | 
19 |
20 | ##### More Examples
21 | Full Examples are available on the project [wiki](https://github.com/lmangani/docker-clickhouse-grafana/wiki)
22 |
23 |
24 | ## Docker Hub Image
25 | ```
26 | qxip/clickhouse-grafana
27 | ```
28 |
29 | ## Launch w/ Compose
30 | ```
31 | docker-compose up -d
32 | ```
33 |
34 | ## Build Local Image
35 | ```
36 | git clone https://github.com/lmangani/docker-clickhouse-grafana
37 | cd docker-clickhouse-grafana
38 |
39 | docker build -t qxip/clickhouse-grafana:local .
40 | ```
41 | ##### Credits
42 | This bundle lives thanks to the Vertamedia [clickhouse-grafana](https://github.com/Vertamedia/clickhouse-grafana) datasource plugin
43 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "2"
2 | services:
3 | clickhouse:
4 | image: yandex/clickhouse-server
5 | ports:
6 | - 8123
7 | grafana-storage:
8 | image: busybox:latest
9 | volumes:
10 | - /var/lib/grafana
11 | grafana:
12 | image: qxip/clickhouse-grafana
13 | ports:
14 | - "3000:3000"
15 | volumes_from:
16 | - grafana-storage
17 | environment:
18 | GF_INSTALL_PLUGINS: "grafana-piechart-panel,vertamedia-clickhouse-datasource"
19 | GF_SECURITY_ADMIN_USER: "admin"
20 | GF_SECURITY_ADMIN_PASSWORD: "admin"
21 |
--------------------------------------------------------------------------------
/entrypoint.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | ./run.sh "${@}" &
3 |
4 | until $(curl --output /dev/null --silent --head --fail http://localhost:3000); do
5 | sleep 5
6 | done
7 |
8 | curl -s -H "Content-Type: application/json" \
9 | -XPOST "http://$GF_SECURITY_ADMIN_USER:$GF_SECURITY_ADMIN_PASSWORD@localhost:3000/api/datasources" \
10 | -d @- <