diff --git a/dockerfile b/dockerfile index 5ea3588..42a94bf 100644 --- a/dockerfile +++ b/dockerfile @@ -26,9 +26,10 @@ RUN sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /etc/apache2/sites-available/${DOMAIN}.con a2ensite ${DOMAIN}.conf && \ a2enmod rewrite -# Installer Hubzilla -WORKDIR /var/www/html -RUN git clone https://framagit.org/hubzilla/core.git . && \ +# Cloner Hubzilla dans /var/www/html +RUN rm -rf /var/www/html && \ + git clone https://framagit.org/hubzilla/core.git /var/www/html && \ + cd /var/www/html && \ util/add_addon_repo https://framagit.org/hubzilla/addons.git official && \ mkdir -p store/[data]/smarty3 && \ chown -R www-data:www-data /var/www/html @@ -52,11 +53,11 @@ RUN echo "upload_max_filesize = 20M" >> /etc/php/8.2/apache2/php.ini && \ echo "register_argc_argv = On" >> /etc/php/8.2/apache2/php.ini # Fichier .htconfig.php (préconfiguré) -COPY src/.htconfig.php /var/www/html/.htconfig.php +COPY src/.htconfig.php /tmp/.htconfig.php RUN LOCATION_HASH=$(cat /dev/urandom | tr -dc 'a-f0-9' | fold -w 64 | head -n 1) && \ - sed -i "s/{{DOMAIN}}/${DOMAIN}/g" /var/www/html/.htconfig.php && \ - sed -i "s/{{LOCATION_HASH}}/${LOCATION_HASH}/g" /var/www/html/.htconfig.php && \ - sed -i "s/{{ADMIN_EMAIL}}/${ADMIN_EMAIL}/g" /var/www/html/.htconfig.php + sed "s/{{DOMAIN}}/${DOMAIN}/g; s/{{LOCATION_HASH}}/${LOCATION_HASH}/g; s/{{ADMIN_EMAIL}}/${ADMIN_EMAIL}/g" /tmp/.htconfig.php > /var/www/html/.htconfig.php && \ + chown www-data:www-data /var/www/html/.htconfig.php && \ + rm /tmp/.htconfig.php # Cron RUN echo "*/15 * * * * cd /var/www/html; /usr/bin/php Zotlabs/Daemon/Master.php Cron" | crontab -u www-data -