diff --git a/Dockerfile b/Dockerfile index 425755f..f4857e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 \ @@ -21,6 +22,7 @@ php-gd \ php-mbstring \ php-xml \ php-apcu-bc \ +cron \ wget #Copie et execution du script pour l'installation et l'initialisation de GLPI diff --git a/glpi-start.sh b/glpi-start.sh index fea3a22..8659735 100644 --- a/glpi-start.sh +++ b/glpi-start.sh @@ -30,8 +30,10 @@ fi #Modification du vhost par défaut echo -e "\n\tDocumentRoot /var/www/html/glpi\n\n\t\n\t\tAllowOverride All\n\t\tOrder Allow,Deny\n\t\tAllow from all\n\t\n\n\tErrorLog /var/log/apache2/error-glpi.log\n\tLogLevel warn\n\tCustomLog /var/log/apache2/access-glpi.log combined\n" > /etc/apache2/sites-available/000-default.conf -#Add scheduled task by cron -echo "*/5 * * * * /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null" >> /etc/cron +#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