+# if deployed using helm, use the helm-generated configuration file.
+if [ -d /opt/hemconfig ]; then
+ cp /opt/hemconfig/application.yaml "$main_path/conf/application.yaml"
+else
+ sed -i "s|url:.*|url: jdbc:postgresql://$URL_JDBC:$DB_PORT/$DB_NAME|" "$main_path/conf/application.yaml"
+ sed -i "s|username:.*|username: $JDBC_USERNAME|" "$main_path/conf/application.yaml"
+ sed -i "s|password:.*|password: $JDBC_PASSWORD|" "$main_path/conf/application.yaml"
+fi
+
+export SERVICE_IP=`hostname -i | awk '{print $1}'`
+echo SERVICE_IP=${SERVICE_IP}
+
+if [ ! -z ${HOST_IP} ]; then
+ export HOSTNAME=${HOST_IP}:9102
+else
+ export HOSTNAME=${SERVICE_IP}:9102
+fi
+