-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added some files in order to get app running.
The script container_files/bin/start.sh have a sleep 8000 because left configure apache and test it so we need a procees running in order to get container up and avoid restart always.
- Loading branch information
villadalmine
committed
Sep 7, 2016
1 parent
fe2446e
commit e1bffa1
Showing
7 changed files
with
81 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| MYSQL_DATABASE=grouper | ||
| MYSQL_USER=grouper_user | ||
| MYSQL_PASSWORD=3cf0ccc7d6b240390188367933c9cd90 | ||
| MYSQL_PASSWORD=3cf0ccc7d6b240390188367933c9cd90 | ||
| COMPOSE=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| VERSION=2.3.0 | ||
| TOMCAT_VERSION=6.0.35 | ||
| GROUPER_SYSTEM_PASSWORD=3cf0ccc7d6b240390188367933c9cd90 | ||
| MYSQL_HOST=mariadb | ||
| MYSQL_HOST=mariadb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/bin/bash | ||
| log="/tmp/grouper-configure.log" | ||
| date >> $log | ||
| sed -i "s|#GROUPER_SYSTEM_PASSWORD#|$GROUPER_SYSTEM_PASSWORD|g" /opt/grouper/2.3.0/grouper.installer.properties | ||
|
|
||
| sed -i "s|#MYSQL_HOST#|$MYSQL_HOST|g" /opt/grouper/2.3.0/grouper.hibernate.properties | ||
| sed -i "s|#MYSQL_HOST#|$MYSQL_HOST|g" /opt/grouper/2.3.0/grouper.installer.properties | ||
|
|
||
| sed -i "s|#MYSQL_USER#|$MYSQL_USER|g" /opt/grouper/2.3.0/grouper.hibernate.properties | ||
| sed -i "s|#MYSQL_USER#|$MYSQL_USER|g" /opt/grouper/2.3.0/grouper.installer.properties | ||
|
|
||
| sed -i "s|#MYSQL_PASSWORD#|$MYSQL_PASSWORD|g" /opt/grouper/2.3.0/grouper.hibernate.properties | ||
| sed -i "s|#MYSQL_PASSWORD#|$MYSQL_PASSWORD|g" /opt/grouper/2.3.0/grouper.installer.properties | ||
|
|
||
| sed -i "s|#MYSQL_DATABASE#|$MYSQL_DATABASE|g" /opt/grouper/2.3.0/grouper.hibernate.properties | ||
| sed -i "s|#MYSQL_DATABASE#|$MYSQL_DATABASE|g" /opt/grouper/2.3.0/grouper.installer.properties | ||
|
|
||
| cat /opt/grouper/2.3.0/grouper.hibernate.properties > $log | ||
| cat /opt/grouper/2.3.0/grouper.installer.properties > $log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| #!/bin/bash | ||
|
|
||
| log="/tmp/start-starting.log" | ||
| date >> $log | ||
| if [ -z ${COMPOSE+x} ] | ||
| then | ||
| echo "Not composed so not waiting for MariaDB: " > $log | ||
| /opt/bin/main.sh | ||
| laststatus="$?" | ||
| echo "Not composed status: $laststatus" | ||
| if [ "$laststatus" != "0" ]; then | ||
| echo "Not composed non-zero exit status: $laststatus" >> $log | ||
| echo "Not composed non-zero exit status: $laststatus" | ||
| exit 1 | ||
| else | ||
| echo "Grouper was configured" | ||
| sleep 8000 | ||
| fi | ||
| else | ||
| echo "Composed so waiting for MariaDB: " > $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="$?" | ||
| while [ "$laststatus" != "0" ]; do | ||
| mysql -u $MYSQL_USER -p$MYSQL_PASSWORD -h "$MYSQL_HOST" -e "use grouper; show tables;" | ||
| laststatus="$?" | ||
| sleep 5 | ||
| echo "Trying to connect to mariadb container with $MYSQL_USER to database $MYSQL_DATABASE" | ||
| done | ||
| /opt/bin/main.sh | ||
| laststatus="$?" | ||
| echo "Composed status: $laststatus" | ||
| 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" | ||
| sleep 800000 | ||
| fi | ||
| fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters