Skip to content

Commit

Permalink
Removed supervisord
Browse files Browse the repository at this point in the history
  • Loading branch information
villadalmine committed Sep 8, 2016
1 parent c1a6140 commit e6cbc62
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 106 deletions.
8 changes: 2 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@ RUN mkdir -p /opt/grouper/$VERSION \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel \
MariaDB-client \
supervisor \
mlocate \
&& yum clean all

# The installer creates a HSQL DB which we ignore later

RUN mkdir -p /var/log/supervisor
RUN mv /etc/supervisord.conf /etc/supervisord.conf.old
COPY container_files/conf/supervisord.conf /etc
WORKDIR /opt/grouper/$version
RUN java -cp :grouperInstaller.jar edu.internet2.middleware.grouperInstaller.GrouperInstaller

VOLUME /opt/grouper/2.3.0/apache-tomcat-$TOMCAT_VERSION/logs

EXPOSE 8080 8009 8005 9001
CMD ["/usr/bin/supervisord"]
EXPOSE 8080 8009 8005
CMD ["/opt/bin/start.sh"]
14 changes: 0 additions & 14 deletions container_files/bin/apache-grouper.sh

This file was deleted.

2 changes: 1 addition & 1 deletion container_files/bin/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ else
echo "Grouper container has run." >> $log
echo "If there are problems, docker rm this container and try again." >> $log
fi
exit 0
#exit 0
22 changes: 16 additions & 6 deletions container_files/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,43 @@ then
echo "Not composed non-zero exit status: $laststatus"
exit 1
else
echo "Grouper was configured" >>$log
echo "Grouper was configured"
echo "Starting apache"
exit 0
#/usr/local/bin/httpd-shib-foreground
echo "Starting tomcat and apache" >>$log
echo "Starting tomcat and apache"
/usr/local/bin/httpd-shib-foreground &
/opt/grouper/2.3.0/apache-tomcat-6.0.35/bin/catalina.sh run
fi
else
echo "Composed so waiting for MariaDB: " > $log
date >> $log
echo "Testing connectivy to database before continue with install"
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h "$MYSQL_HOST" -e "use grouper; show tables;"
laststatus="$?"
echo "checking connectivity" >> $log
while [ "$laststatus" != "0" ]; do
mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h "$MYSQL_HOST" -e "use grouper; show tables;"
laststatus="$?"
sleep 5
date >> $log
echo "Trying to connect to mariadb container with $MYSQL_USER to database $MYSQL_DATABASE"
echo "Trying to connect to mariadb container with $MYSQL_USER to database $MYSQL_DATABASE" >> $log
done
/opt/bin/main.sh
laststatus="$?"
echo "Composed status: $laststatus"
echo "Composed status: $laststatus" >>$log
if [ "$laststatus" != "0" ]; then
echo "Composed non-zero exit status: $laststatus" >> $log
echo "Composed non-zero exit status: $laststatus"
exit 1
else
echo "Grouper was configured" >>$log
echo "Grouper was configured"
echo "Starting apache"
exit 0
#/usr/local/bin/httpd-shib-foreground
echo "Starting tomcat and apache" >>$log
echo "Starting tomcat and apache"
date >> $log
/usr/local/bin/httpd-shib-foreground &
/opt/grouper/2.3.0/apache-tomcat-6.0.35/bin/catalina.sh run
fi
fi
20 changes: 0 additions & 20 deletions container_files/bin/tomcat-grouper.sh

This file was deleted.

59 changes: 0 additions & 59 deletions container_files/conf/supervisord.conf

This file was deleted.

0 comments on commit e6cbc62

Please sign in to comment.