Last active
September 25, 2020 20:24
-
-
Save mikequentel/a992e3bd53504ceb19ac2f6a3ba1a74f to your computer and use it in GitHub Desktop.
Grafana and Prometheus docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
prometheus: | |
image: prom/prometheus:latest | |
restart: unless-stopped | |
ports: | |
- "9090:9090" | |
volumes: | |
- /home/${USER}/opt/prometheus/data:/opt/prometheus/data:rw | |
- /home/${USER}/opt/prometheus/config:/opt/prometheus/config:rw | |
environment: | |
SERVER_KEY: ${SERVER_KEY} | |
SERVER_CERT: ${SERVER_CERT} | |
grafana: | |
image: grafana/grafana:latest | |
restart: unless-stopped | |
ports: | |
- "3000:3000" | |
volumes: | |
- /home/${USER}/var/lib/grafana:/var/lib/grafana:rw | |
- /home/${USER}/var/log/grafana:/var/log/grafana:rw | |
- /home/${USER}/etc/grafana/grafana.ini:/etc/grafana/grafana.ini:rw | |
- /home/${USER}/etc/grafana/ldap.toml:/etc/grafana/ldap.toml:rw | |
environment: | |
SERVER_KEY: ${SERVER_KEY} | |
SERVER_CERT: ${SERVER_CERT} | |
GF_SECURITY_ADMIN_USER: ${GF_SECURITY_ADMIN_USER} | |
GF_SECURITY_ADMIN_PASSWORD: ${GF_SECURITY_ADMIN_PASSWORD} | |
depends_on: | |
- "prometheus" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment