Skip to content

Latest commit

 

History

History
executable file
·
99 lines (79 loc) · 3.34 KB

README.md

File metadata and controls

executable file
·
99 lines (79 loc) · 3.34 KB

Grafana with PostgreSQL

Hits

Docker Grafana Postgres

This repository can build a Grafana service easily and quickly using Docker.

grafana

Features

Requirements

Installation

docker install script only for Linux OS (Ubuntu/CentOs)

# Install docker
$ sudo chmod 755 ./install-docker.sh
$ sudo ./install-docker.sh

Build

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

Usage

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

Configuraion

  • .env: related to Makefile and workspace/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

Structure

└── 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

License

The MIT License (MIT). Please see License File for more information.