Open KarmaPol opened 8 months ago
grafana:
hostname: 'grafana'
image: grafana/grafana:latest
restart: always
tmpfs:
- /run
volumes:
- grafana_data:/var/lib/grafana
- ./infrastructure/config/grafana/grafana.ini:/etc/grafana /grafana.ini
- ./infrastructure/config/grafana/datasource.yml:/etc/grafana/provisioning/datasources/datasource.yml
ports:
- "3000:3000"
tmpfs 실행 명령어 추가
GF_PATHS_DATA='/var/lib/grafana' is not writable.
You may have issues with file permissions, more information here: http://docs.grafana.org/installation/docker/#migrate-to-v51-or-later
mkdir: can't create directory '/var/lib/grafana/plugins': Permission denied
https://velog.io/@sgjung/Monitoring-간단한-Prometheus-실습w.-docker
https://velog.io/@sojukang/세상에서-제일-쉬운-Prometheus-Grafana-모니터링-설정-MySQL편
https://velog.io/@swhan9404/Prometheus를-docker로-구성해보기#grafana
해결책 https://groups.google.com/g/prometheus-users/c/EuEW0qRzXvg/m/0aqKh_ZABQAJ?pli=1
services:
prometheus:
image: prom/prometheus:v2.21.0
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.retention=${PROMETHEUS_RETENTION:-48h}'
user: root
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./prometheus.yml:/etc/prometheus/prometheus.yml
프로메테우스 설정파일 반영 명령어