From 8f4bbf118c96b27c2e700f7ba014a28f39f07674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sta=C5=86islavs?= Date: Tue, 5 Dec 2023 13:57:11 +0200 Subject: [PATCH] Set dsn and container name for postgre integration --- configuration/chirpstack/chirpstack.toml | 2 +- configuration/postgresql/initdb/003-init-integrationdb.sh | 1 - docker-compose.yml | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configuration/chirpstack/chirpstack.toml b/configuration/chirpstack/chirpstack.toml index c225750..47ae5af 100644 --- a/configuration/chirpstack/chirpstack.toml +++ b/configuration/chirpstack/chirpstack.toml @@ -106,6 +106,6 @@ json=true [integration.postgresql] - dsn="postgres://chirpstack:chirpstack@localhost/chirpstack_integration?sslmode=disable" + dsn="postgres://chirpstack:chirpstack@postgres/chirpstack_integration?sslmode=disable" diff --git a/configuration/postgresql/initdb/003-init-integrationdb.sh b/configuration/postgresql/initdb/003-init-integrationdb.sh index cbb1032..81de1d8 100644 --- a/configuration/postgresql/initdb/003-init-integrationdb.sh +++ b/configuration/postgresql/initdb/003-init-integrationdb.sh @@ -3,6 +3,5 @@ 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 diff --git a/docker-compose.yml b/docker-compose.yml index ccadd09..9eeb368 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,7 @@ services: - chirpstack postgres: + container_name: postgres image: postgres:14-alpine restart: unless-stopped ports: