Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DiouxX committed Apr 11, 2018
2 parents c5a337f + e8a5791 commit d8ff9bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ENV DEBIAN_FRONTEND noninteractive

#Installation d'apache et de php5 avec extension
RUN apt update \
&& apt -y upgrade \
&& apt -y install \
apache2 \
php \
Expand All @@ -21,8 +22,8 @@ php-gd \
php-mbstring \
php-xml \
php-apcu-bc \
wget \
cron
cron \
wget

#Copie et execution du script pour l'installation et l'initialisation de GLPI
COPY glpi-start.sh /opt/
Expand Down
8 changes: 5 additions & 3 deletions glpi-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ fi
#Modification du vhost par défaut
echo -e "<VirtualHost *:80>\n\tDocumentRoot /var/www/html/glpi\n\n\t<Directory /var/www/html/glpi>\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t</Directory>\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n</VirtualHost>" > /etc/apache2/sites-available/000-default.conf

#Add scheduled task by cron
echo "*/5 * * * * root /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron.d/glpicron
#Add scheduled task by cron and enable
echo "*/2 * * * * www-data /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron.d/glpi
#Start cron service
service cron start

#Activation du module rewrite d'apache
a2enmod rewrite && service apache2 restart && service apache2 stop

#Lancement du service apache au premier plan
cron -f & /usr/sbin/apache2ctl -D FOREGROUND
/usr/sbin/apache2ctl -D FOREGROUND

0 comments on commit d8ff9bd

Please sign in to comment.