Skip to main content

Use your own PostgreSQL

The graph database is PostgreSQL with the Apache AGE extension. To use a PostgreSQL you already run:

  1. Install Apache AGE on it (1.6 or later), and create a database for the graphs.
  2. As a superuser, run the bundle's sql/project-graph-init.sql in that database. Its header shows the command. It creates the extension and Grafana's read-only login. It needs a superuser once, to let that login load AGE in every session.
  3. In .env, remove COMPOSE_PROFILES=graph-db and set GRAPH_DB_HOST, GRAPH_DB_PORT, GRAPH_DB_NAME, GRAPH_DB_USER and GRAPH_DB_PASSWORD to the login that owns the graphs, and GRAPH_DB_SSLMODE (require for a remote database).
  4. Skip the init job, which would need a superuser: start with docker compose -f docker-compose-impact.yml up -d --scale graph-db-init=0. Re-run the SQL file by hand after an upgrade.