Simplify postgres setup (#110)

This commit is contained in:
trivialkettle 2025-01-10 17:02:02 +01:00 committed by GitHub
parent 036db35749
commit eabc95adb3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 9 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="chirpstack" <<-EOSQL
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname="$POSTGRES_DB" <<-EOSQL
create extension pg_trgm;
create extension hstore;
EOSQL

View File

@ -1,7 +0,0 @@
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL
create role chirpstack with login password 'chirpstack';
create database chirpstack with owner chirpstack;
EOSQL

View File

@ -57,7 +57,9 @@ services:
- ./configuration/postgresql/initdb:/docker-entrypoint-initdb.d
- postgresqldata:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=root
- POSTGRES_USER=chirpstack
- POSTGRES_PASSWORD=chirpstack
- POSTGRES_DB=chirpstack
redis:
image: redis:7-alpine