diff --git a/Dockerfile b/Dockerfile index 8ee0f5f7b..454be6674 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM php:8.3-apache ENV CI_ENV=docker # Install dependencies -RUN set -ex; \ +RUN set -e; \ \ apt-get update; \ apt-get install -y --no-install-recommends \ @@ -20,7 +20,7 @@ RUN set -ex; \ rm -rf /var/lib/apt/lists/*; # Enabling custom upload settings in PHP -RUN set -ex; \ +RUN set -e; \ \ { \ echo 'file_uploads = On'; \ @@ -30,27 +30,30 @@ RUN set -ex; \ echo 'max_execution_time = 600'; \ } > $PHP_INI_DIR/conf.d/wavelog.ini; +# Copy proper file to target image COPY ./ /var/www/html/ WORKDIR /var/www/html -RUN mkdir ./userdata -RUN mkdir ./application/config/docker -RUN mv ./.htaccess.sample ./.htaccess -RUN echo "Setting www-data as owner of the html folder" \ -&& chown -R www-data:www-data /var/www/html -RUN echo "Setting permissions to the install folder" \ -&& cd /var/www/html \ -&& chmod -R g+rw ./application/config/ \ -&& chmod -R g+rw ./application/logs/ \ -&& chmod -R g+rw ./assets/qslcard/ \ -&& chmod -R g+rw ./backup/ \ -&& chmod -R g+rw ./updates/ \ -&& chmod -R g+rw ./uploads/ \ -&& chmod -R g+rw ./userdata/ \ -&& chmod -R g+rw ./images/eqsl_card_images/ \ -&& chmod -R g+rw ./assets/ \ -&& chmod -R g+rw ./application/config/docker/ \ -&& chmod -R 777 /var/www/html/install +# Setting permissions as: https://github.com/wavelog/Wavelog/wiki/Installation +RUN set -e; \ + \ + mkdir ./userdata; \ + mkdir ./application/config/docker; \ + \ + mv ./.htaccess.sample ./.htaccess; \ + \ + chown -R root:www-data /var/www/html; \ + \ + chmod -R g+rw ./application/config/; \ + chmod -R g+rw ./application/logs/; \ + chmod -R g+rw ./assets/; \ + chmod -R g+rw ./backup/; \ + chmod -R g+rw ./updates/; \ + chmod -R g+rw ./uploads/; \ + chmod -R g+rw ./userdata/; \ + chmod -R g+rw ./images/eqsl_card_images/; \ + chmod -R g+rw ./install/; + RUN echo "Installing cronjobs" \ RUN touch /etc/crontab && \ echo "0 */12 * * * curl --silent http://localhost/clublog/upload &>/dev/null" >> /etc/crontab && \