1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-23 01:39:27 +02:00

update grafana

This commit is contained in:
kev 2020-05-14 17:20:13 +08:00
parent a27df6542c
commit 786877f393
2 changed files with 70 additions and 36 deletions

View File

@ -6,29 +6,47 @@ grafana
[Grafana][1] is a leading open source application for visualizing large-scale
measurement data.
As an alternative to installing and running the image renderer as a plugin you
can run it as a remote image rendering service using [Docker][3].
[Installing using Docker][2]
## docker-compose.yml
```yaml
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- ./data:/var/lib/grafana
environment:
- GF_SERVER_ROOT_URL=http://grafana.example.com:3000/
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_USER=grafana@example.com
- GF_SMTP_FROM_ADDRESS=grafana@example.com
- GF_SMTP_PASSWORD=******
- GF_USERS_ALLOW_SIGN_UP=false
- GF_ALERTING_ERROR_OR_TIMEOUT=keep_state
restart: always
version: "3.8"
services:
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- ./data:/var/lib/grafana
environment:
- GF_SERVER_ROOT_URL=http://grafana.example.com:3000/
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_USER=grafana@example.com
- GF_SMTP_FROM_ADDRESS=grafana@example.com
- GF_SMTP_PASSWORD=******
- GF_USERS_ALLOW_SIGN_UP=false
- GF_ALERTING_ERROR_OR_TIMEOUT=keep_state
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
restart: unless-stopped
renderer:
image: grafana/grafana-image-renderer
ports:
- "8081:8081"
environment:
- ENABLE_METRICS=true
- BROWSER_TZ=Asia/Shanghai
restart: unless-stopped
```
## up and running
@ -47,3 +65,4 @@ $ curl http://localhost:3000/
[1]: http://grafana.org/
[2]: http://docs.grafana.org/installation/docker/
[3]: https://github.com/grafana/grafana-image-renderer/blob/master/docs/remote_rendering_using_docker.md

View File

@ -1,18 +1,33 @@
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- ./data:/var/lib/grafana
environment:
- GF_SERVER_ROOT_URL=http://grafana.example.com:3000/
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_USER=grafana@example.com
- GF_SMTP_FROM_ADDRESS=grafana@example.com
- GF_SMTP_PASSWORD=******
- GF_USERS_ALLOW_SIGN_UP=false
- GF_ALERTING_ERROR_OR_TIMEOUT=keep_state
restart: always
version: "3.8"
services:
grafana:
image: grafana/grafana
ports:
- "3000:3000"
volumes:
- ./data:/var/lib/grafana
environment:
- GF_SERVER_ROOT_URL=http://grafana.example.com:3000/
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.gmail.com:587
- GF_SMTP_USER=grafana@example.com
- GF_SMTP_FROM_ADDRESS=grafana@example.com
- GF_SMTP_PASSWORD=******
- GF_USERS_ALLOW_SIGN_UP=false
- GF_ALERTING_ERROR_OR_TIMEOUT=keep_state
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
restart: unless-stopped
renderer:
image: grafana/grafana-image-renderer
ports:
- "8081:8081"
environment:
- ENABLE_METRICS=true
- BROWSER_TZ=Asia/Shanghai
restart: unless-stopped