Skip to content

Commit

Permalink
Resolves wildfly issue
Browse files Browse the repository at this point in the history
  • Loading branch information
surajnarwade committed Nov 20, 2018
1 parent 00f6f6f commit 9b088af
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
8 changes: 8 additions & 0 deletions assemble-and-restart
Expand Up @@ -2,6 +2,7 @@
set -x
set -eo pipefail


# We now run the assembly script. If there is a custom one written in the
# source files, we use that instead.
if [ -f ${ODO_S2I_SRC_BIN_PATH}/.s2i/bin/assemble ]; then
Expand All @@ -13,6 +14,13 @@ else
/usr/libexec/s2i/assemble
fi

###
# This is only to solve wildfly issue
#Ref: https://github.com/redhat-developer/odo/issues/445
mkdir /opt/app-root/backup
cp -rvf ${ODO_S2I_DEPLOYMENT_DIR}/* /opt/app-root/backup/
####

# Restart supervisord in order to actualy run the application
# This is a dumb way to start as supervisord does not have a restart function
/var/lib/supervisord/bin/supervisord ctl stop run; /var/lib/supervisord/bin/supervisord ctl start run
12 changes: 12 additions & 0 deletions run
Expand Up @@ -2,6 +2,18 @@
set -x
set -eo pipefail

###
# This is specific solution for wildfly problems
# Ref: https://github.com/redhat-developer/odo/issues/445
if [ -e ${ODO_S2I_DEPLOYMENT_DIR}/ROOT.war ]; then
echo "ok"
else
echo "copying files from backup"
cp -rvf /opt/app-root/backup/* ${ODO_S2I_DEPLOYMENT_DIR}/

fi
###

# We now run the run script. If there is a custom one written in the
# source files, we use that instead.
if [ -f ${ODO_S2I_SRC_BIN_PATH}/.s2i/bin/run ]; then
Expand Down

0 comments on commit 9b088af

Please sign in to comment.