Migrate grafana to postgres
This commit is contained in:
parent
8efb3e0d69
commit
17f0e22962
1 changed files with 12 additions and 0 deletions
|
@ -5,9 +5,12 @@ services:
|
||||||
image: grafana/grafana:latest
|
image: grafana/grafana:latest
|
||||||
environment:
|
environment:
|
||||||
- TZ=Europe/London
|
- TZ=Europe/London
|
||||||
|
- GF_DATABASE_URL=postgres://grafana:grafana@db/grafana
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/tank/app-data/grafana:/var/lib/grafana
|
- /mnt/tank/app-data/grafana:/var/lib/grafana
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
networks:
|
networks:
|
||||||
- default
|
- default
|
||||||
- grafana
|
- grafana
|
||||||
|
@ -16,6 +19,15 @@ services:
|
||||||
- traefik.http.routers.grafana.rule=Host(`grafana.jakehoward.tech`)
|
- traefik.http.routers.grafana.rule=Host(`grafana.jakehoward.tech`)
|
||||||
- traefik.http.routers.grafana.tls.certresolver=le
|
- traefik.http.routers.grafana.tls.certresolver=le
|
||||||
|
|
||||||
|
db:
|
||||||
|
image: postgres:12-alpine
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /mnt/tank/dbs/postgres/grafana:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=grafana
|
||||||
|
- POSTGRES_USER=grafana
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
grafana:
|
grafana:
|
||||||
external: true
|
external: true
|
||||||
|
|
Loading…
Reference in a new issue