From 5f662cbce123d040ded5d26800155d551a01ec5c Mon Sep 17 00:00:00 2001 From: Hylke van der Schaaf Date: Wed, 13 Nov 2024 17:11:56 +0100 Subject: [PATCH] Clarified documentation on postgresql --- docs/deployment/postgresql.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/deployment/postgresql.md b/docs/deployment/postgresql.md index b9554f7f2..3e77b313f 100644 --- a/docs/deployment/postgresql.md +++ b/docs/deployment/postgresql.md @@ -9,18 +9,27 @@ order: 13 The FROST-Server needs a database to store its data. Currently only [PostgreSQL](https://www.postgresql.org/) with the [PostGIS](https://postgis.net/) extensions is supported. + ## Database installation 1. create PostgreSQL database for the data 2. install the postgis extensions in this database (`CREATE EXTENSION postgis;`) 3. Optional: If you want to use UUIDs as entity ids, you need the uuid-ossp extension (`CREATE EXTENSION "uuid-ossp";`) -## Database configuration -The HTTP and all-in-one MQTTP packages use JNDI to get a database resource from Tomcat or Wildfly. You have to configure -a resource in Tomcat/Wildfly, and then tell the FROST-Server what name you gave this resource. +## Database Connection in FROST + +### Tomcat / Wildfly + +When FROST-Server is deployed directly on Tomcat or Wildfly, the HTTP and all-in-one MQTTP packages use JNDI to get a database resource. +You have to configure a resource in Tomcat/Wildfly, and then tell the FROST-Server what name you gave this resource. The default name is `jdbc/sensorThings`. +### Containers + +When deploying FROST-Server using containers, the database connection details are configured using environment variables. +The relevant variables are: `persistence.db.url`, `persistence.db.username` and `persistence.db.password`. + ## Database initialisation or upgrade