From fbd21a035bb205565cf87d8a91ed7b1394ab5f12 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 8 May 2025 17:20:36 -0400 Subject: [PATCH] Ensure /var/www/config exists and is owned by www-data so that start.sh sed -i updates work reliably --- CHANGELOG.md | 8 ++++++++ Dockerfile | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2146020..a1b7af8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## Changes 5/8/2025 + +### Docker 🐳 + +- Ensure `/var/www/config` exists and is owned by `www-data` (chmod 750) so that `start.sh`’s `sed -i` updates to `config.php` work reliably + +--- + ## Changes 5/8/2025 v1.3.3 ### Enhancements diff --git a/Dockerfile b/Dockerfile index 4c922f8..72ad7f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,6 +51,11 @@ COPY custom-php.ini /etc/php/8.3/apache2/conf.d/99-app-tuning.ini COPY --from=appsource /var/www /var/www COPY --from=composer /app/vendor /var/www/vendor +# ── ensure config/ is writable by www-data so sed -i can work ── +RUN mkdir -p /var/www/config \ + && chown -R www-data:www-data /var/www/config \ + && chmod 750 /var/www/config + # Secure permissions: code read-only, only data dirs writable RUN chown -R root:www-data /var/www && \ find /var/www -type d -exec chmod 755 {} \; && \