This repository can build a Grafana service easily and quickly using Docker.
- Grafana
open-source platform for monitoring and observability
- Grafana image renderer
Grafana backend plugin that handles rendering panels and dashboards to PNGs using a headless browser (Chromium).
- PostfreSQL
open-source relational database management system.
using it as a Grafana metadata database
docker install script only for Linux OS (Ubuntu/CentOs)
# Install docker
$ sudo chmod 755 ./install-docker.sh
$ sudo ./install-docker.sh
Setting Environments and Build Docker volumes for Grafana stack
# .env file
$ mv .env.example .env
# Create docker volume & network and Set directory owner & mode
$ make build
By default, simply run as make run
command.
# it means, `docker compose up`
$ make run
If you want to change run
command, fix it in Makefile.
# fix `run` in Makefile.
# @docker compose --env-file ./.env -f ./workspace/grafana-postgres/docker-compose.yml up [SERVICE...]
$ make run
- .env: related to
Makefile
andworkspace/grafana-postgres/docker-compose.yml
# .env
# docker volume path
DEFAULT_CONTAINER_VOLUME_PATH=/data/container
# docker volume
VOLUME_GRAFANA_DATA=grafana_data
VOLUME_GRAFANA_PROVISIONING=grafana_provisioning
VOLUME_POSTGRESQL_DATA=postgresql_data_grafana
# docker network
NETWORK_GRAFANA=grafana-net
# version for official docker images
IMAGE_GRAFANA=8.5.4
IMAGE_GRAFANA_IMAGE_RENDERER=3.4.1
IMAGE_POSTGRESQL=12.2-alpine
If you want to know about Grafana
and PosgreSQL
configuraion , here
└── monitoring-grafana-postgresql
├── install-docker.sh # Install docker
├── README.md
├── Makefile # Build & Run script
├── LICENSE.md
└── workspace
└── grafana # Grafana workspace
├── docker-compose.yml # related to `.env` and `Makefile`
├── README.md # README for Grafana workspace
├── postgresql # postgresql init directory
└── grafana # grafana init directory
The MIT License (MIT). Please see License File for more information.