diff --git a/Dockerfile b/Dockerfile index ada4b71..ee13953 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,10 @@ 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 && \ diff --git a/laravel-paths.php b/laravel-paths.php new file mode 100644 index 0000000..250282f --- /dev/null +++ b/laravel-paths.php @@ -0,0 +1,8 @@ +useStoragePath('/app/data/storage'); diff --git a/start.sh b/start.sh index 6485479..ae9aa23 100644 --- a/start.sh +++ b/start.sh @@ -14,9 +14,6 @@ fi chown -R cloudron:cloudron /app/data chmod -R 755 /app/data/storage -# Create symlink from /app/code/storage to /app/data/storage -ln -sf /app/data/storage /app/code/storage - # Create .env file in /app/data echo "==> Configuring application environment" cat > /app/data/.env <