Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Corrected PHP version number and added check for database starting
ethan committed Aug 26, 2019
1 parent 89228ae commit dd8b567
Showing 3 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion Sources/HR/Dockerfile

This file was deleted.

6 changes: 3 additions & 3 deletions Sources/HR/sentrifugo_server/Dockerfile
@@ -19,13 +19,13 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y softw
RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" >> /etc/apt/sources.list && echo "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu xenial main" >> /etc/apt/sourceis.list && apt-get update --allow-unauthenticated
RUN cat /etc/apt/sources.list && ls -l /etc/apt/
RUN apt-get install -y --allow-unauthenticated apache2-bin libapache2-mod-php php-curl php-ldap php-mysql php-mcrypt \
php-gd php-xml patch curl vim git mysql-client wget unzip lynx
php-gd php-xml patch curl vim git mysql-client wget unzip lynx netcat

RUN phpenmod mcrypt && phpenmod gd
RUN a2enmod xml2enc && a2enmod rewrite

RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.2/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.2/cli/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.3/apache2/php.ini
RUN sed -i 's/variables_order = .*/variables_order = "EGPCS"/' /etc/php/7.3/cli/php.ini

RUN useradd --uid 1000 --gid 50 docker

3 changes: 2 additions & 1 deletion Sources/HR/sentrifugo_server/entrypoint.sh
@@ -5,11 +5,11 @@ cd /var/www/html
if [ ! -s /var/www/html/sentrifugo/public/db_constants.php ]
then
sleep 15
while ! nc -z sentrifugo_data 3306 ; do echo waiting for mysql on sentrifugo_data to start; sleep 3; done;
apachectl start && sleep 2 && curl -d "host=sentrifugo_data&username=sentrifugo&password=54y6RxN7GfC7aes3&dbname=sentrifugo" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:80/install/step2.php && curl -data-raw "app_name=sentrifugo" -data-raw "email=sentrifugo.container@gmail.com" -H "Content-Type: application/x-www-form-urlencoded" -X POST http://localhost:80/install/step3.php
apachectl stop
mysql -h sentrifugo_data -u sentrifugo --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/step3.sql
mysql -h sentrifugo_data -u sentrifugo --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/step4.sql
mysql -h sentrifugo_data -u sentrifugo --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/step5.sql
mysql -h sentrifugo_data -u sentrifugo --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/banderson.sql
cd /tmp/
/tmp
@@ -18,6 +18,7 @@ tar zxf lib_mysqludf_amqp-2.0.0.tar.gz
cd /tmp/lib_mysqludf_amqp-2.0.0
mysql -h sentrifugo_data -u root --password=54y6RxN7GfC7aes3 < installdb.sql
mysql -h sentrifugo_data -u root --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/trigger.sql
mysql -h sentrifugo_data -u sentrifugo --password=54y6RxN7GfC7aes3 sentrifugo < /tmp/step5.sql
mv /var/www/html/sentrifugo/install /var/www/html/sentrifugo/install.old
echo database initialization complete
fi

0 comments on commit dd8b567

Please sign in to comment.