infrastructure/ansible/roles/forrest/files/grafana/docker-compose.yml

53 lines
1.4 KiB
YAML
Raw Normal View History

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/
2021-02-14 12:19:51 +00:00
- GF_SERVER_ROOT_URL=https://grafana.jakehoward.tech
- GF_SERVER_ENABLE_GZIP=true
2022-06-13 21:52:40 +01:00
- GF_DEFAULT_FORCE_MIGRATION=true
- GF_FEATURE_TOGGLES_ENABLE=publicDashboards
2021-02-14 12:19:51 +00:00
- GF_SMTP_ENABLED=true
2022-09-18 15:27:58 +01:00
- GF_SMTP_HOST=smtp.eu.mailgun.org:465
2021-02-14 12:29:14 +00:00
- GF_SMTP_USER={{ grafana_smtp_user }}
2021-02-14 12:19:51 +00:00
- GF_SMTP_PASSWORD={{ grafana_smtp_password }}
2021-02-14 12:29:14 +00:00
- GF_SMTP_FROM_ADDRESS={{ grafana_from_email }}
2021-02-14 12:19:51 +00:00
- GF_SMTP_FROM_NAME=grafana
volumes:
2021-02-14 11:33:46 +00:00
- "{{ 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:
2021-12-22 13:10:06 +00:00
image: postgres:14-alpine
restart: unless-stopped
volumes:
2021-02-14 11:33:46 +00:00
- /mnt/tank/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