From 00a1312ee3e8f9c39e29f0d0ba99f385ac955a03 Mon Sep 17 00:00:00 2001 From: hackerESQ Date: Thu, 30 Jan 2025 19:16:33 -0600 Subject: [PATCH] fix: move storage:link to dockerfile --- docker/Dockerfile | 10 ++++------ docker/entrypoint.sh | 9 --------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bea7a85..21665c0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -47,12 +47,10 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf -# Set permissions and ensure www-data has a shell available -RUN chown -R www-data:www-data . \ - && chmod -R 775 ./storage \ - && chmod +x ./docker/entrypoint.sh - -# && usermod -s /bin/bash www-data +# Set permissions and link storage +RUN php artisan storage:link \ + && chown -R www-data:www-data . \ + && chmod +x ./docker/entrypoint.sh # Serve on port 80 EXPOSE 80 diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 4e87b89..8b2d2b0 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -16,15 +16,6 @@ chown -R www-data:www-data storage echo -e "\n > Storage directory scaffolding is OK... " -# Ensure storage symlink exists -if [[ ! -L "public/storage" ]]; then - echo -e "\n > Creating symbolic link for app public storage... " - - php artisan storage:link -else - echo -e "\n > Storage linked... " -fi - # Ensure app key is generated if [[ -z "$APP_KEY" ]]; then echo -e "\n > Oops! The required APP_KEY configuration is missing in your environment! "