Add instructions for PostgreSQL setup.
This commit is contained in:
parent
01adb82cf2
commit
054a933def
1 changed files with 17 additions and 1 deletions
18
README.md
18
README.md
|
@ -2,7 +2,23 @@
|
|||
|
||||
OpenDTU logger connects to the OpenDTU livedata websocket and captures metrics.
|
||||
These metrics are inserted into a PostgreSQL database.
|
||||
Optionally, TimescaleDB can be used for better performance.
|
||||
Optionally, TimescaleDB can be used.
|
||||
|
||||
## PostgreSQL setup
|
||||
|
||||
```sql
|
||||
CREATE DATABASE opendtu_logger;
|
||||
CREATE USER opendtu_logger WITH password 'SECRET';
|
||||
GRANT ALL privileges ON DATABASE opendtu_logger TO opendtu_logger;
|
||||
GRANT ALL ON SCHEMA public TO opendtu_logger;
|
||||
```
|
||||
|
||||
Optional: enable TimescaleDB extension
|
||||
|
||||
```sql
|
||||
\c opendtu_logger
|
||||
CREATE EXTENSION OF NOT EXISTS timescaledb;
|
||||
```
|
||||
|
||||
## Environment variables
|
||||
|
||||
|
|
Loading…
Reference in a new issue