init_commit

This commit is contained in:
Staņislavs 2023-12-05 13:19:54 +02:00
parent 9a6ced18f0
commit bebb9e9e9d
3 changed files with 16 additions and 1 deletions

View File

@ -99,8 +99,13 @@
[integration]
enabled=["mqtt"]
enabled=["mqtt", "postgresql"]
[integration.mqtt]
server="tcp://$MQTT_BROKER_HOST:1883/"
json=true
[integration.postgresql]
dsn="postgres://chirpstack:chirpstack@localhost/chirpstack_integration?sslmode=disable"

View File

@ -0,0 +1,8 @@
#!/bin/bash
set -e
# PostgreSQL commands to create a new role and database for ChirpStack
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role chirpstack with login password 'chirpstack';
create database chirpstack_integration with owner chirpstack;
EOSQL

View File

@ -56,6 +56,8 @@ services:
postgres:
image: postgres:14-alpine
restart: unless-stopped
ports:
- 5432:5432
volumes:
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data