Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Merge pull request #24 from docker/issue22
Browse files Browse the repository at this point in the history
Issue22
  • Loading branch information
Jim Van Fleet authored Nov 17, 2016
2 parents 7d83564 + 3117c7c commit 0997833
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ RUN mkdir /opt/shared \
&& chmod +x /opt/autoexec/onbuild/*.sh

# Environment variables
ENV ADMIN_NAME "Scott"
ENV ADMIN_FAMILY "Koranda"
ENV ADMIN_USERNAME "scott.koranda@sphericalcowgroup.com"
ENV ADMIN_GIVEN_NAME "Scott"
ENV ADMIN_FAMILY_NAME "Koranda"
ENV ADMIN_EPPN "scott.koranda@sphericalcowgroup.com"
ENV COMANAGE_SERVER_FQDN "comanage.testbed.tier.internet2.edu"
ENV COMANAGE_MAIL_FROM "comanage_registry@picard.cgac.uwm.edu"
ENV COMANAGE_MAIL_HOST "localhost"
Expand All @@ -103,9 +103,9 @@ ENV MYSQL_HOST "i2mariadb"
ENV MYSQL_DATABASE "registry"
ENV MYSQL_USER "registry_user"
ENV MYSQL_PASSWORD "WJzesbe3poNZ91qIbmR7"
ENV ADMIN_FAMILY "admin"
ENV ADMIN_USERNAME "admin"
ENV ADMIN_NAME "admin"
ENV ADMIN_FAMILY_NAME "admin"
ENV ADMIN_EPPN "admin"
ENV ADMIN_GIVEN_NAME "admin"

# How long will we wait for MariaDB to start up?
ENV WAIT_TIME 60
Expand Down
8 changes: 4 additions & 4 deletions container_files/bin/configure_php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ if [ -z ${COMPOSE+x} ];then
echo "Comanage is not composed no database configuration will be perform" >> $log
else
echo "Comanage is composed. Checking variables to Configure first database data" >> $log
if [[ $ADMIN_NAME && ${ADMIN_NAME-x} ]] && [[ $ADMIN_FAMILY && ${ADMIN_FAMILY-x} ]] && [[ $ADMIN_USERNAME && ${ADMIN_USERNAME-x} ]] && [[ $VERSION && ${VERSION-x} ]]; then
if [[ $ADMIN_GIVEN_NAME && ${ADMIN_GIVEN_NAME-x} ]] && [[ $ADMIN_FAMILY_NAME && ${ADMIN_FAMILY_NAME-x} ]] && [[ $ADMIN_EPPN && ${ADMIN_EPPN-x} ]] && [[ $VERSION && ${VERSION-x} ]]; then
echo "Variables are ok" >> $log
echo "Doing first configuration in database data" >> $log
cd /opt/comanage/comanage-registry-$VERSION/app
Expand All @@ -65,9 +65,9 @@ else
date >> $log
echo "First database input was completed without any error" >> $log
echo "Doing variable parsing" >> $log
sed -i "s|ADMIN_NAME|$ADMIN_NAME|g" /opt/bin/configure_php_user.sh
sed -i "s|ADMIN_FAMILY|$ADMIN_FAMILY|g" /opt/bin/configure_php_user.sh
sed -i "s|ADMIN_USERNAME|$ADMIN_USERNAME|g" /opt/bin/configure_php_user.sh
sed -i "s|ADMIN_GIVEN_NAME|$ADMIN_GIVEN_NAME|g" /opt/bin/configure_php_user.sh
sed -i "s|ADMIN_FAMILY_NAME|$ADMIN_FAMILY_NAME|g" /opt/bin/configure_php_user.sh
sed -i "s|ADMIN_EPPN|$ADMIN_EPPN|g" /opt/bin/configure_php_user.sh
/opt/bin/configure_php_user.sh
laststatus=$?
if [ "$laststatus" != "0" ]; then
Expand Down
2 changes: 1 addition & 1 deletion container_files/bin/configure_php_user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ laststatus=$?
if [ ! $laststatus -eq 0 ]; then
cd /opt/comanage/comanage-registry-$VERSION/app
echo "Performing database user setup" >> $log
./Console/cake setup --admin-given-name ADMIN_NAME --admin-family-name ADMIN_FAMILY --admin-username ADMIN_USERNAME --enable-pooling=No --force >> $log
./Console/cake setup --admin-given-name ADMIN_GIVEN_NAME --admin-family-name ADMIN_FAMILY_NAME --admin-username ADMIN_EPPN --enable-pooling=No --force >> $log
else
echo "table cm_users exists, skipping provisioning" >> $log
fi
Expand Down

0 comments on commit 0997833

Please sign in to comment.