From 5ce6457d5f69339b0c93ec92be73fc7c905bd7b8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 22 Oct 2025 09:27:32 -0600 Subject: [PATCH] Fix: Create storage symlink during Docker build - Create symlink from /app/code/storage to /app/data/storage in Dockerfile - Symlink is created during build when filesystem is writable - Removed Laravel paths override approach - Deleted unused laravel-paths.php file --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index ee13953..8515819 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,8 +55,9 @@ RUN cd /app/code && \ rm -rf node_modules && \ chown -R cloudron:cloudron /app/code/public -# Remove storage directory - will be symlinked to /app/data/storage in start.sh -RUN rm -rf /app/code/storage +# Remove storage directory and create symlink to /app/data/storage +RUN rm -rf /app/code/storage && \ + ln -s /app/data/storage /app/code/storage # Copy configuration files COPY nginx.conf /etc/nginx/sites-available/default @@ -64,10 +65,6 @@ COPY supervisor.conf /etc/supervisor/conf.d/anonaddy.conf COPY start.sh /app/code/start.sh COPY postfix-main.cf /tmp/postfix-main.cf COPY postfix-master.cf /tmp/postfix-master.cf -COPY laravel-paths.php /app/code/laravel-paths.php - -# Patch bootstrap/app.php to use custom storage paths -RUN sed -i '/\$app = new Illuminate/a require_once __DIR__.'\''/laravel-paths.php'\'';' /app/code/bootstrap/app.php # Initialize data directory structure RUN mkdir -p /tmp/data && \