Skip to content

Commit

Permalink
Clarified documentation on postgresql
Browse files Browse the repository at this point in the history
  • Loading branch information
hylkevds committed Nov 13, 2024
1 parent 4a6341b commit 5f662cb
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/deployment/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5f662cb

Please sign in to comment.