aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/deployment/docker
diff options
context:
space:
mode:
authorMurali <murali.p@huawei.com>2017-09-11 09:00:23 +0000
committerMurali <murali.p@huawei.com>2017-09-11 10:00:17 +0000
commit1afd0119bae208ed376ac332b274bc5155753ecb (patch)
tree81ccc86ccfa89f9927030da575e7d10b930f76dc /vnfmarket-be/deployment/docker
parentbe9a20159f1c9d35923b35503e94d1ae93101035 (diff)
Migrate from mysql to postgres
Change-Id: I2112d0ac91cff745cd0043a3b3c2b8ebaa00f764 Jira:VNFSDK-77 Signed-off-by: Murali <murali.p@huawei.com>
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
+