From 269158787fbedec8814f9368221e738d57e56a4a Mon Sep 17 00:00:00 2001 From: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com> Date: Mon, 23 Sep 2019 16:38:41 +0300 Subject: [PATCH] use env variables instead of using plain passwords Signed-off-by: Krasi Georgiev <8903888+krasi-georgiev@users.noreply.github.com> --- configuration/postgresql/initdb/001-init-loraserver_ns.sh | 2 +- configuration/postgresql/initdb/002-init-loraserver_as.sh | 2 +- docker-compose-env.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration/postgresql/initdb/001-init-loraserver_ns.sh b/configuration/postgresql/initdb/001-init-loraserver_ns.sh index a8f3ff9..52f51a9 100644 --- a/configuration/postgresql/initdb/001-init-loraserver_ns.sh +++ b/configuration/postgresql/initdb/001-init-loraserver_ns.sh @@ -2,6 +2,6 @@ set -e psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL - create role loraserver_ns with login password 'loraserver_ns'; + create role loraserver_ns with login password '$POSTGRES_PASSWORD'; create database loraserver_ns with owner loraserver_ns; EOSQL diff --git a/configuration/postgresql/initdb/002-init-loraserver_as.sh b/configuration/postgresql/initdb/002-init-loraserver_as.sh index 3480ad6..fd45543 100644 --- a/configuration/postgresql/initdb/002-init-loraserver_as.sh +++ b/configuration/postgresql/initdb/002-init-loraserver_as.sh @@ -2,6 +2,6 @@ set -e psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" <<-EOSQL - create role loraserver_as with login password 'loraserver_as'; + create role loraserver_as with login password '$POSTGRES_PASSWORD'; create database loraserver_as with owner loraserver_as; EOSQL diff --git a/docker-compose-env.yml b/docker-compose-env.yml index 84ba6eb..1cff867 100644 --- a/docker-compose-env.yml +++ b/docker-compose-env.yml @@ -20,7 +20,7 @@ services: - REDIS.URL=redis://redis:6379 - APPLICATION_SERVER.INTEGRATION.MQTT.SERVER=tcp://mosquitto:1883 - APPLICATION_SERVER.API.PUBLIC_HOST=appserver:8001 - - APPLICATION_SERVER.EXTERNAL_API.JWT_SECRET=verysecret + - APPLICATION_SERVER.EXTERNAL_API.JWT_SECRET=${JWT_SECRET} gatewaybridge: image: loraserver/lora-gateway-bridge:3