From 6c206ef37461c6037c4cbbef67341184e960bb13 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 16 Dec 2023 07:00:33 +0100 Subject: [PATCH 1/2] Fix permission issue --- src/entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 47568e3..12b3828 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -57,6 +57,7 @@ else echo "Custom php.ini file not found" echo "If you want to add a custom php.ini file, you add it in /var/www/html/conf/php/php.ini" fi +chown -R www-data:www-data /var/www/html echo "" echo "**********************************" From 5badbd3c99487a97368fe2e06b1fd6f8c4a187ed Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Sat, 16 Dec 2023 07:19:50 +0100 Subject: [PATCH 2/2] Update README --- README.md | 22 +++++++++++++--------- src/entrypoint.sh | 1 - 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index db27e89..36120fc 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ volumes: ## Build from base Dockerfile ```Dockerfile -FROM jkaninda/laravel-php-fpm:8.2 +FROM jkaninda/laravel-php-fpm:8.3 # Copy laravel project files COPY . /var/www/html # Storage Volume @@ -195,12 +195,12 @@ VOLUME /var/www/html/storage WORKDIR /var/www/html -# Custom cache invalidation -ARG CACHEBUST=1 -RUN composer install - -RUN chown -R www-data:www-data /var/www/html/storage -RUN chown -R www-data:www-data /var/www/html/bootstrap/cache +# Custom cache invalidation / optional +#ARG CACHEBUST=1 +# Run composer install / Optional +#RUN composer install +# Fix permissions +RUN chown -R www-data:www-data /var/www/html ``` ## Supervisord @@ -227,9 +227,13 @@ stdout_logfile=/var/www/html/storage/logs/kafka.log > /var/www/html/conf/php/php.ini ### Storage permision issue -> docker-compose exec php-fpm /bin/bash +```sh + docker-compose exec php-fpm /bin/bash + ``` -> chown -R www-data:www-data /var/www/html/storage +```sh + chown -R www-data:www-data /var/www/html + ``` > chmod -R 775 /var/www/html/storage diff --git a/src/entrypoint.sh b/src/entrypoint.sh index 12b3828..47568e3 100644 --- a/src/entrypoint.sh +++ b/src/entrypoint.sh @@ -57,7 +57,6 @@ else echo "Custom php.ini file not found" echo "If you want to add a custom php.ini file, you add it in /var/www/html/conf/php/php.ini" fi -chown -R www-data:www-data /var/www/html echo "" echo "**********************************"