Grafana

Launch Grafana instantly with Docker Compose for monitoring and observability. Comes with persistent dashboards and configurable admin credentials for a ready-to-use setup.

yaml

docker-compose.yml

services:
  grafana:
    image: grafana/grafana:11.6.1
    restart: unless-stopped
    environment:
      GF_SECURITY_ADMIN_USER: ${GRAFANA_ADMIN_USER}
      GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_ADMIN_PASSWORD}
    ports:
      - ${GRAFANA_PORT}:3000
    volumes:
      - grafana_data:/var/lib/grafana
volumes:
  grafana_data:

.ENV

.env example

GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=changeme123
GRAFANA_PORT=3000

deployment

Quick Start

  1. Create a working directory named after the service.
  2. Copy the compose file and generated `.env` into that directory.
  3. Review the variables and replace placeholders with real values.
  4. Run `docker compose up -d`.
mkdir grafana
cd grafana
# create docker-compose.yml
# create .env
docker compose up -d