summaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/deployment/docker
diff options
context:
space:
mode:
authorMurali Mohan Murthy Potham <murali.p@huawei.com>2017-09-11 10:11:43 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-11 10:11:43 +0000
commitcaf8a4b51fb6583189c9544112e245e7a01b8dca (patch)
treee7dfdb7fd155391ba4567fca9fbdfd9ea1670dd8 /vnfmarket-be/deployment/docker
parentfe9f6d77d59454755a36022956fcb466fd79372c (diff)
parent1afd0119bae208ed376ac332b274bc5155753ecb (diff)
Merge "Migrate from mysql to postgres"
Diffstat (limited to 'vnfmarket-be/deployment/docker')
-rwxr-xr-xvnfmarket-be/deployment/docker/src/main/docker/docker-entrypoint.sh5
-rwxr-xr-xvnfmarket-be/deployment/docker/src/main/docker/instance-init.sh4
2 files changed, 9 insertions, 0 deletions
diff --git a/vnfmarket-be/deployment/docker/src/main/docker/docker-entrypoint.sh b/vnfmarket-be/deployment/docker/src/main/docker/docker-entrypoint.sh
index a4527bb6..4dba1a4f 100755
--- a/vnfmarket-be/deployment/docker/src/main/docker/docker-entrypoint.sh
+++ b/vnfmarket-be/deployment/docker/src/main/docker/docker-entrypoint.sh
@@ -23,6 +23,10 @@
if [ -z "$SERVICE_IP" ]; then
export SERVICE_IP=`hostname -i`
fi
+if [ -z "$POSTGRES_IP" ]; then
+ export POSTGRES_IP=127.0.0.1
+fi
+
echo
echo Environment Variables:
echo "SERVICE_IP=$SERVICE_IP"
@@ -38,6 +42,7 @@ chown -R mysql /var/lib/mysql
chgrp -R mysql /var/lib/mysql
su mysql -c /usr/bin/mysqld_safe &
+
# Perform one-time config
if [ ! -e init.log ]; then
# Perform workarounds due to defects in release binary
diff --git a/vnfmarket-be/deployment/docker/src/main/docker/instance-init.sh b/vnfmarket-be/deployment/docker/src/main/docker/instance-init.sh
index a7d5bb3d..25a22581 100755
--- a/vnfmarket-be/deployment/docker/src/main/docker/instance-init.sh
+++ b/vnfmarket-be/deployment/docker/src/main/docker/instance-init.sh
@@ -20,3 +20,7 @@ mysql -uroot -prootpass < init/marketplace_tables_mysql.sql
# Set mysql password
sed -i 's|Changeme_123|rootpass|' webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml
+
+#Set postgres instance IP
+sed -i 's|$POSTGRES_IP|127.0.0.1|' webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml
+