infrastructure/ansible/roles/prometheus/files/grafana/docker-compose.yml
Jake Howard ee96e6ab08
Some checks failed
/ ansible (push) Failing after 1m35s
/ terraform (push) Failing after 12m54s
Rename forrest role to prometheus
Makes organising much simpler
2024-04-21 19:47:02 +01:00

57 lines
1.5 KiB
YAML

version: "2.3"
services:
grafana:
image: grafana/grafana:latest
environment:
- TZ={{ timezone }}
- GF_DATABASE_URL=postgres://grafana:grafana@db/grafana
- GF_RENDERING_SERVER_URL=http://renderer:8081/render
- GF_RENDERING_CALLBACK_URL=http://grafana:3000/
- GF_SERVER_ROOT_URL=https://grafana.jakehoward.tech
- GF_SERVER_ENABLE_GZIP=true
- GF_DEFAULT_FORCE_MIGRATION=true
- GF_FEATURE_TOGGLES_ENABLE=publicDashboards
- GF_ANALYTICS_ENABLED=false
- GF_ANALYTICS_REPORTING_ENABLED=false
- GF_ANALYTICS_CHECK_FOR_UPDATES=false
- GF_ANALYTICS_CHECK_FOR_PLUGIN_UPDATES=false
- GF_SMTP_ENABLED=true
- GF_SMTP_HOST=smtp.eu.mailgun.org:465
- GF_SMTP_USER={{ vault_grafana_smtp_user }}
- GF_SMTP_PASSWORD={{ vault_grafana_smtp_password }}
- GF_SMTP_FROM_ADDRESS={{ vault_grafana_from_email }}
- GF_SMTP_FROM_NAME=grafana
volumes:
- "{{ app_data_dir }}/grafana:/var/lib/grafana"
networks:
- default
- grafana
restart: unless-stopped
ports:
- "{{ pve_hosts.forrest.ip }}:3000:3000"
depends_on:
- db
- renderer
db:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- /mnt/speed/dbs/postgres/grafana/:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=grafana
- POSTGRES_USER=grafana
renderer:
image: grafana/grafana-image-renderer:latest
restart: unless-stopped
environment:
- BROWSER_TZ={{ timezone }}
networks:
grafana:
external: true