From 121be9b5ef4ab23629be311acbb4a12eae00af15 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 20 Jan 2025 17:45:11 +0100 Subject: [PATCH] Update Dockerfile for website root changes - Changed document root variable to WEBSITE_ROOT - Updated configuration files to reflect new path - Set ownership of the website directory to www-data - Adjusted .env file renaming to use the new root variable --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 58dada9..22e07fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV TZ=Europe/Brussels ENV COMPOSER_ALLOW_SUPERUSER=1 ENV DEBIAN_FRONTEND=noninteractive -COPY . ${APACHE_DOCUMENT_ROOT} +COPY . ${WEBSITE_ROOT} RUN sed -ri -e "s!/var/www/html!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/sites-available/*.conf RUN sed -ri -e "s!/var/www/!${APACHE_DOCUMENT_ROOT}!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf @@ -30,9 +30,11 @@ RUN set -eux; \ chmod uga+x /usr/local/bin/entrypoint.sh && \ chmod uga+x /usr/local/bin/apache2-foreground && sync +RUN chown -R www-data:www-data ${WEBSITE_ROOT} USER www-data + WORKDIR ${WEBSITE_ROOT} -RUN mv .env.sample .env +RUN mv ${WEBSITE_ROOT}.env.sample ${WEBSITE_ROOT}.env RUN composer install RUN php bin/console asset-map:compile