From 8faf181de4478cd71466dfa3eded50aa9016e1eb Mon Sep 17 00:00:00 2001 From: Niranjana Date: Tue, 23 Feb 2021 15:59:05 +0000 Subject: Use non-root user to access DES database and update the base image to align with ONAP Issue-ID: DCAEGEN2-2329 Issue-ID: DCAEGEN2-2420 Signed-off-by: Niranjana Change-Id: I1fa1cdf1890efb18ac46dd3e494fe587a2a65223 Signed-off-by: vv770d --- components/datalake-handler/des/src/assembly/run.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'components/datalake-handler/des/src/assembly/run.sh') diff --git a/components/datalake-handler/des/src/assembly/run.sh b/components/datalake-handler/des/src/assembly/run.sh index decd97e0..e6df159d 100644 --- a/components/datalake-handler/des/src/assembly/run.sh +++ b/components/datalake-handler/des/src/assembly/run.sh @@ -1,5 +1,6 @@ # ============LICENSE_START=================================================== # Copyright (C) 2020 China Mobile. +# Copyright (C) 2021 Wipro Limited. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,12 +21,14 @@ echo "start init db ..." -/bin/run-parts /home/datalake/db_init +export PGPASSWORD=$PG_PASSWORD + +sh db_init/11_create-database +sh db_init/20_db-initdb echo "finish init db" cmd=`find . -name des*-execute.jar` - if [ -n "$cmd" ]; then java -jar "$cmd" else -- cgit