diff --git a/Dockerfile b/Dockerfile index 8384447..4063a88 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,10 @@ RUN npm install && npm run build # Create storage link RUN php artisan storage:link +# Copy entrypoint script +COPY entrypoint.sh /etc/cont-init.d/99-fix-symlink +RUN chmod +x /etc/cont-init.d/99-fix-symlink + # Fix permissions for Laravel storage and bootstrap/cache # Use numeric IDs (1000:1000 from PUID/PGID in docker-compose) RUN chown -R 1000:1000 /app/www && \ diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..0bbdf10 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# Recreate storage symlink after volumes are mounted +rm -rf /app/www/public/games +ln -sfn ../storage/app/public/games /app/www/public/games